Clear the recorder when deactivating the anim graph. (#4201)
Signed-off-by: rhhong <rhhong@amazon.com>
This commit is contained in:
@@ -715,12 +715,15 @@ namespace CommandSystem
|
||||
// restore the workspace dirty flag
|
||||
GetCommandManager()->SetWorkspaceDirtyFlag(m_oldWorkspaceDirtyFlag);
|
||||
|
||||
AZStd::string resultString;
|
||||
GetCommandManager()->ExecuteCommandInsideCommand("Unselect -animGraphIndex SELECT_ALL", resultString);
|
||||
MCore::CommandGroup commandGroup;
|
||||
commandGroup.AddCommandString("RecorderClear");
|
||||
commandGroup.AddCommandString("Unselect -animGraphIndex SELECT_ALL");
|
||||
if (animGraph)
|
||||
{
|
||||
GetCommandManager()->ExecuteCommandInsideCommand(AZStd::string::format("Select -animGraphID %d", animGraph->GetID()), resultString);
|
||||
commandGroup.AddCommandString(AZStd::string::format("Select -animGraphID %d", animGraph->GetID()));
|
||||
}
|
||||
AZStd::string resultString;
|
||||
GetCommandManager()->ExecuteCommandGroupInsideCommand(commandGroup, resultString);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user