diff --git a/Gems/EMotionFX/Code/EMotionFX/Pipeline/SceneAPIExt/Behaviors/ActorGroupBehavior.cpp b/Gems/EMotionFX/Code/EMotionFX/Pipeline/SceneAPIExt/Behaviors/ActorGroupBehavior.cpp index 6be086a31b..d199c0c2cc 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Pipeline/SceneAPIExt/Behaviors/ActorGroupBehavior.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Pipeline/SceneAPIExt/Behaviors/ActorGroupBehavior.cpp @@ -168,7 +168,7 @@ namespace EMotionFX AZ::SceneAPI::Events::ProcessingResult ActorGroupBehavior::BuildDefault(AZ::SceneAPI::Containers::Scene& scene) const { - // Skip adding the actor group if it's already exist. + // Skip adding the actor group if it already exists. if (SceneHasActorGroup(scene)) { return AZ::SceneAPI::Events::ProcessingResult::Ignored; @@ -185,7 +185,7 @@ namespace EMotionFX } const bool hasAnimationData = AZ::SceneAPI::Utilities::DoesSceneGraphContainDataLike(scene, true); - // Skip adding the actor group if it's contain animation data but don't contain any skindata or blendshapedata. + // Skip adding the actor group if it contains animation data but doesn't contain any skin or blendshape data. if (hasAnimationData && !hasSkinData && !hasBlendShapeData) { return AZ::SceneAPI::Events::ProcessingResult::Ignored; diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderPlugin.cpp b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderPlugin.cpp index 2531d12853..0f479872e1 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderPlugin.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderPlugin.cpp @@ -313,7 +313,7 @@ namespace EMStudio void RenderPlugin::OnActorReady([[maybe_unused]] EMotionFX::Actor* actor) { - ReInit(/*resetViewCloseup=*/true); + m_reinitRequested = true; } // try to locate the helper actor for a given instance @@ -535,6 +535,7 @@ namespace EMStudio } mFirstFrameAfterReInit = true; + m_reinitRequested = false; // zoom the camera to the available character only in case we're dealing with a single instance if (resetViewCloseup && numActorInstances == 1) @@ -851,6 +852,11 @@ namespace EMStudio return; } + if (m_reinitRequested) + { + ReInit(/*resetViewCloseup=*/true); + } + // update EMotion FX, but don't render UpdateActorInstances(timePassedInSeconds); diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderPlugin.h b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderPlugin.h index 72cdb4c4bf..ecea26f8f6 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderPlugin.h +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderPlugin.h @@ -226,6 +226,7 @@ namespace EMStudio QWidget* mInnerWidget; CommandSystem::SelectionList* mCurrentSelection; bool mFirstFrameAfterReInit; + bool m_reinitRequested = false; // command callbacks MCORE_DEFINECOMMANDCALLBACK(UpdateRenderActorsCallback);