From f5791ee60a9b4f1982fdc81bae554ea1f5af99ee Mon Sep 17 00:00:00 2001 From: luissemp Date: Thu, 15 Apr 2021 10:08:07 -0700 Subject: [PATCH] Fixed compile error and added Setters to Node Palette --- .../Editor/View/Widgets/NodePalette/NodePaletteModel.cpp | 8 ++++++++ .../Code/Include/ScriptCanvas/Variable/GraphVariable.h | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp index bce247aee7..4154c3982e 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp @@ -578,6 +578,14 @@ namespace categoryPath.append(displayName.c_str()); } + for (auto property : behaviorClass->m_properties) + { + if (property.second->m_setter) + { + RegisterMethod(nodePaletteModel, behaviorContext, categoryPath, behaviorClass, property.first, *property.second->m_setter, behaviorClass->IsMethodOverloaded(property.first)); + } + } + for (auto methodIter : behaviorClass->m_methods) { if (!IsExplicitOverload(*methodIter.second)) diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/GraphVariable.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/GraphVariable.h index 4aa3729d7c..af25100fbe 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/GraphVariable.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Variable/GraphVariable.h @@ -184,7 +184,7 @@ namespace ScriptCanvas int GetSortPriority() const; static const char* s_InitialValueSourceNames[VariableFlags::InitialValueSource::COUNT]; - static const char* GraphVariable::s_ScopeNames[VariableFlags::Scope::COUNT]; + static const char* GraphVariable::s_ScopeNames[static_cast(VariableFlags::Scope::COUNT)]; private: