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>
monroegm-disable-blank-issue-2
AMZN-stankowi 4 years ago committed by GitHub
parent d5431e1c57
commit 69b5c04b7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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;

@ -74,6 +74,8 @@ namespace SceneBuilder
{
m_cachedFingerprint.append(element);
}
// A general catch all version fingerprint. Update this to force all FBX files to recompile.
m_cachedFingerprint.append("Version 1");
}
return m_cachedFingerprint.c_str();

Loading…
Cancel
Save