Merge branch 'development' into cmake/linux_fix_warn_unused

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-08-24 11:49:35 -07:00
123 changed files with 11267 additions and 11666 deletions
@@ -602,15 +602,24 @@ namespace ScriptCanvas
}
}
void EBusEventHandler::OnWriteEnd()
void EBusEventHandler::OnDeserialize()
{
AZStd::lock_guard<AZStd::recursive_mutex> lock(m_mutex);
if (!m_ebus)
{
CreateHandler(m_ebusName);
}
Node::OnDeserialize();
}
#if defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)////
void EBusEventHandler::OnWriteEnd()
{
OnDeserialize();
}
#endif//defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)
NodeTypeIdentifier EBusEventHandler::GetOutputNodeType(const SlotId& slotId) const
{
for (auto mapPair : m_eventMap)
@@ -138,7 +138,11 @@ namespace ScriptCanvas
void SetAutoConnectToGraphOwner(bool enabled);
void OnDeserialize();
#if defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)////
void OnWriteEnd();
#endif//defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)
AZStd::string GetNodeName() const override
{
@@ -313,6 +313,7 @@ namespace ScriptCanvas
}
PopulateNodeType();
m_warnOnMissingFunction = true;
}
bool Method::InitializeOverloaded([[maybe_unused]] const NamespacePath& namespaces, AZStd::string_view className, AZStd::string_view methodName)
@@ -739,10 +740,11 @@ namespace ScriptCanvas
return TupleType{ nullptr, MethodType::Count, EventType::Count, nullptr };
}
void Method::OnWriteEnd()
void Method::OnDeserialize()
{
AZStd::lock_guard<AZStd::recursive_mutex> lock(m_mutex);
m_warnOnMissingFunction = true;
const AZ::BehaviorClass* bcClass{};
const AZ::BehaviorMethod* method{};
EventType eventType;
@@ -758,15 +760,23 @@ namespace ScriptCanvas
{
AZ_Warning("ScriptCanvas", !m_warnOnMissingFunction, "method node failed to deserialize properly");
}
}
if (m_resultSlotIDs.empty())
{
m_resultSlotIDs.emplace_back(SlotId{});
}
Node::OnDeserialize();
}
#if defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)////
void Method::OnWriteEnd()
{
OnDeserialize();
}
#endif//defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)
bool Method::BranchesOnResult() const
{
return m_method && m_method->HasResult() &&
@@ -829,7 +839,9 @@ namespace ScriptCanvas
{
serializeContext->Class<Method, Node>()
->Version(MethodCPP::eVersion::Current, &MethodCPP::MethodVersionConverter)
#if defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)////
->EventHandler<SerializeContextOnWriteEndHandler<Method>>()
#endif//defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)
->Field("methodType", &Method::m_methodType)
->Field("methodName", &Method::m_lookupName)
->Field("className", &Method::m_className)
@@ -22,7 +22,6 @@ namespace AZ
namespace ScriptCanvas
{
AZ::Outcome<void, AZStd::string> IsExposable(const AZ::BehaviorMethod& method);
Grammar::FunctionPrototype ToSignature(const AZ::BehaviorMethod& method);
@@ -31,7 +30,8 @@ namespace ScriptCanvas
{
namespace Core
{
class Method : public Node
class Method
: public Node
{
public:
AZ_COMPONENT(Method, "{E42861BD-1956-45AE-8DD7-CCFC1E3E5ACF}", Node);
@@ -107,7 +107,11 @@ namespace ScriptCanvas
SlotId GetBusSlotId() const;
void OnDeserialize();
#if defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)////
void OnWriteEnd();
#endif//defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)
virtual bool IsMethodOverloaded() const { return false; }
@@ -180,7 +184,7 @@ namespace ScriptCanvas
AZStd::vector<SlotId> m_inputSlots;
AZStd::vector<SlotId> m_resultSlotIDs;
AZStd::recursive_mutex m_mutex; // post-serialization
bool m_warnOnMissingFunction = true;
bool m_warnOnMissingFunction = false;
Method(const Method&) = delete;
};
@@ -60,7 +60,9 @@ namespace ScriptCanvas
{
serializeContext->Class<MethodOverloaded, Method>()
->Version(MethodOverloadedCpp::Version::Current, &MethodOverloadedVersionConverter)
#if defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)////
->EventHandler<SerializeContextReadWriteHandler<MethodOverloaded>>()
#endif//defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)
->Field("orderedInputSlotIds", &MethodOverloaded::m_orderedInputSlotIds)
->Field("outputSlotIds", &MethodOverloaded::m_outputSlotIds)
;
@@ -186,6 +188,7 @@ namespace ScriptCanvas
RefreshActiveIndexes();
ConfigureContracts();
SetWarnOnMissingFunction(true);
}
SlotId MethodOverloaded::AddMethodInputSlot(const MethodConfiguration& config, size_t argumentIndex)
@@ -397,20 +400,14 @@ namespace ScriptCanvas
return signature;
}
void MethodOverloaded::OnReadBegin()
{
}
void MethodOverloaded::OnReadEnd()
{
}
void MethodOverloaded::OnWriteBegin()
{
SetWarnOnMissingFunction(false);
}
#if defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)////
void MethodOverloaded::OnWriteEnd()
{
OnDeserialize();
}
#endif//defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)
void MethodOverloaded::OnDeserialize()
{
AZStd::lock_guard<AZStd::recursive_mutex> lock(GetMutex());
@@ -462,6 +459,7 @@ namespace ScriptCanvas
}
SetWarnOnMissingFunction(true);
Node::OnDeserialize();
}
void MethodOverloaded::SetupMethodData(const AZ::BehaviorMethod* behaviorMethod, const AZ::BehaviorClass* behaviorClass)
@@ -33,7 +33,9 @@ namespace ScriptCanvas
, public OverloadContractInterface
{
private:
#if defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)////
friend class SerializeContextReadWriteHandler<MethodOverloaded>;
#endif//defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)
public:
static void Reflect(AZ::ReflectContext* reflectContext);
@@ -91,13 +93,15 @@ namespace ScriptCanvas
// \todo make execution thread sensitive, which can then support generic programming
Grammar::FunctionPrototype GetInputSignature() const;
#if defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)////
// SerializeContextReadWriteHandler
void OnReadBegin();
void OnReadEnd();
void OnWriteBegin();
void OnReadBegin() {}
void OnReadEnd() {}
void OnWriteBegin() {}
void OnWriteEnd();
////
#endif//defined(OBJECT_STREAM_EDITOR_ASSET_LOADING_SUPPORT_ENABLED)
void OnDeserialize() override;
void SetupMethodData(const AZ::BehaviorMethod* lookupMethod, const AZ::BehaviorClass* lookupClass);
void ConfigureContracts();
@@ -5,7 +5,6 @@
QualifiedName="ScriptCanvas::Nodes::Logic::Gate"
PreferredClassName="If"
Uuid="{F19CC10A-02FD-4E75-ADAA-9CFBD8A4E2F8}"
Base="ScriptCanvas::Node"
Icon="Icons/ScriptCanvas/Print.png"
Version="0"
GeneratePropertyFriend="True"