From 4baea40a75985314cca06a9a154299cf5de12ecc Mon Sep 17 00:00:00 2001 From: Dayo Lawal Date: Mon, 26 Jul 2021 17:48:22 -0500 Subject: [PATCH] Reflect() fix Signed-off-by: Dayo Lawal --- .../Code/Source/Application/AtomToolsApplication.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Application/AtomToolsApplication.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Application/AtomToolsApplication.cpp index 1ad2048ae4..0ee06d3fc2 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Application/AtomToolsApplication.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Application/AtomToolsApplication.cpp @@ -82,12 +82,13 @@ namespace AtomToolsFramework if (auto behaviorContext = azrtti_cast(context)) { + AZStd::string fileName = GetBuildTargetName() + ".general"; // this will put these methods into the 'azlmbr.AtomTools.general' module - auto addGeneral = [](AZ::BehaviorContext::GlobalMethodBuilder methodBuilder) + auto addGeneral = [fileName](AZ::BehaviorContext::GlobalMethodBuilder methodBuilder) { methodBuilder->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Automation) ->Attribute(AZ::Script::Attributes::Category, "Editor") - ->Attribute(AZ::Script::Attributes::Module, "AtomTools.general"); + ->Attribute(AZ::Script::Attributes::Module, fileName); }; // The reflection here is based on patterns in CryEditPythonHandler::Reflect addGeneral(behaviorContext->Method(