Cleared m_scriptFilename between scene files. (#2278)
This fixes a bug where a Python script file would be run on a scene file that didn't have a script file set. Added a general case version to SceneBuilderWorker.cpp, to make it easy to mark all scene files as dirty. Automated tests for this will come in a separate pull request. Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>
This commit is contained in:
@@ -305,6 +305,11 @@ namespace AZ::SceneAPI::Behaviors
|
||||
{
|
||||
using namespace AzToolsFramework;
|
||||
|
||||
// This behavior persists on the same AssetBuilder. Clear the script file name so that if
|
||||
// this builder processes a scene file with a script file name, and then later processes
|
||||
// a scene without a script file name, it won't run the old script on the new scene.
|
||||
m_scriptFilename.clear();
|
||||
|
||||
if (action != ManifestAction::Update)
|
||||
{
|
||||
return Events::ProcessingResult::Ignored;
|
||||
|
||||
Reference in New Issue
Block a user