Merge branch 'development' of https://github.com/o3de/o3de into carlitosan/development

This commit is contained in:
chcurran
2021-09-02 18:14:39 -07:00
334 changed files with 3022 additions and 2797 deletions
@@ -28,7 +28,7 @@ namespace ScriptCanvasEditor
{
setDynamicSortFilter(true);
m_showColumn.insert(aznumeric_cast<int>(AssetBrowserEntry::Column::DisplayName));
m_shownColumns.insert(aznumeric_cast<int>(AssetBrowserEntry::Column::DisplayName));
UnitTestWidgetNotificationBus::Handler::BusConnect();
@@ -408,7 +408,7 @@ namespace ScriptCanvasEditor::Nodes
AZ::BehaviorAzEventDescription behaviorAzEventDesc;
AZ::AttributeReader azEventDescAttributeReader(nullptr, azEventDescAttribute);
azEventDescAttributeReader.Read<decltype(behaviorAzEventDesc)>(behaviorAzEventDesc);
if(behaviorAzEventDesc.m_eventName.empty())
if (behaviorAzEventDesc.m_eventName.empty())
{
AZ_Error("NodeUtils", false, "Cannot create an AzEvent node with empty event name")
return {};
@@ -140,21 +140,10 @@ namespace
// If the reflected method returns an AZ::Event, reflect it to the SerializeContext
if (AZ::MethodReturnsAzEventByReferenceOrPointer(method))
{
AZ::SerializeContext* serializeContext{};
AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext);
const AZ::BehaviorParameter* resultParameter = method.GetResult();
AZ::SerializeContext::ClassData classData;
classData.m_name = resultParameter->m_name;
classData.m_typeId = resultParameter->m_typeId;
classData.m_azRtti = resultParameter->m_azRtti;
auto EventPlaceholderAnyCreator = [](AZ::SerializeContext*) -> AZStd::any
{
return AZStd::make_any<AZStd::monostate>();
};
serializeContext->RegisterType(resultParameter->m_typeId, AZStd::move(classData), EventPlaceholderAnyCreator);
ScriptCanvas::ReflectEventTypeOnDemand(resultParameter->m_typeId, resultParameter->m_name, resultParameter->m_azRtti);
}
nodePaletteModel.RegisterClassNode(categoryPath, behaviorClass ? behaviorClass->m_name : "", name, &method, &behaviorContext, propertyStatus, isOverloaded);
}
@@ -177,19 +166,8 @@ namespace
// If the reflected method returns an AZ::Event, reflect it to the SerializeContext
if (AZ::MethodReturnsAzEventByReferenceOrPointer(behaviorMethod))
{
AZ::SerializeContext* serializeContext{};
AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext);
const AZ::BehaviorParameter* resultParameter = behaviorMethod.GetResult();
AZ::SerializeContext::ClassData classData;
classData.m_name = resultParameter->m_name;
classData.m_typeId = resultParameter->m_typeId;
classData.m_azRtti = resultParameter->m_azRtti;
auto EventPlaceholderAnyCreator = [](AZ::SerializeContext*) -> AZStd::any
{
return AZStd::make_any<AZStd::monostate>();
};
serializeContext->RegisterType(resultParameter->m_typeId, AZStd::move(classData), EventPlaceholderAnyCreator);
ScriptCanvas::ReflectEventTypeOnDemand(resultParameter->m_typeId, resultParameter->m_name, resultParameter->m_azRtti);
}
nodePaletteModel.RegisterMethodNode(behaviorContext, behaviorMethod);