From df02813cd4c84b9cd7505f06d6fcbbc70377f077 Mon Sep 17 00:00:00 2001 From: chcurran <82187351+carlitosan@users.noreply.github.com> Date: Wed, 30 Jun 2021 11:58:04 -0700 Subject: [PATCH] Hide ExecutionState methods from SC, Fixes LYN-4900 Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com> --- .../Code/Include/ScriptCanvas/Execution/ExecutionState.cpp | 2 ++ .../Execution/Interpreted/ExecutionStateInterpreted.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/ExecutionState.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/ExecutionState.cpp index aebb3ed20e..e60b4b1b82 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/ExecutionState.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/ExecutionState.cpp @@ -92,6 +92,8 @@ namespace ScriptCanvas if (auto behaviorContext = azrtti_cast(reflectContext)) { behaviorContext->Class() + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::List) + ->Attribute(AZ::ScriptCanvasAttributes::VariableCreationForbidden, AZ::AttributeIsValid::IfPresent) ->Method("GetEntityId", &ExecutionState::GetEntityId) ->Method("GetScriptCanvasId", &ExecutionState::GetScriptCanvasId) ->Method("ToString", &ExecutionState::ToString) diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpreted.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpreted.cpp index d7cc05cf1b..98e6f17d17 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpreted.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpreted.cpp @@ -132,6 +132,8 @@ namespace ScriptCanvas if (AZ::BehaviorContext* behaviorContext = azrtti_cast(reflectContext)) { behaviorContext->Class() + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::List) + ->Attribute(AZ::ScriptCanvasAttributes::VariableCreationForbidden, AZ::AttributeIsValid::IfPresent) ; } }