Merge commit 'c5615f812ccc9d235747a1c5ba396ac2e9a23690' into daimini/gitflow_211206_o3de
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com> # Conflicts: # Code/Framework/AzToolsFramework/Tests/Prefab/PrefabTestFixture.cpp # Code/Framework/AzToolsFramework/Tests/Prefab/PrefabTestFixture.h # Code/Framework/AzToolsFramework/Tests/UI/EntityOutlinerTests.cpp
This commit is contained in:
+11
-9
@@ -860,18 +860,20 @@ namespace AzToolsFramework
|
||||
return;
|
||||
}
|
||||
|
||||
bool isDuringUndoRedo = false;
|
||||
EBUS_EVENT_RESULT(isDuringUndoRedo, AzToolsFramework::ToolsApplicationRequests::Bus, IsDuringUndoRedo);
|
||||
if (!isDuringUndoRedo)
|
||||
bool suppressTransformChangedEvent = m_suppressTransformChangedEvent;
|
||||
// temporarily disable calling OnTransformChanged, because CheckApplyCachedWorldTransform is not guaranteed
|
||||
// to call it when m_cachedWorldTransform is identity. We send it manually later.
|
||||
m_suppressTransformChangedEvent = false;
|
||||
// When parent comes online, compute local TM from world TM.
|
||||
CheckApplyCachedWorldTransform(parentTransform->GetWorldTM());
|
||||
if (!m_initialized)
|
||||
{
|
||||
// When parent comes online, compute local TM from world TM.
|
||||
CheckApplyCachedWorldTransform(parentTransform->GetWorldTM());
|
||||
}
|
||||
else
|
||||
{
|
||||
// During undo operations, just apply our local TM.
|
||||
m_initialized = true;
|
||||
// If this is the first time this entity is being activated, manually compute OnTransformChanged
|
||||
// this can occur when either the entity first created or undo/redo command is performed
|
||||
OnTransformChanged(AZ::Transform::Identity(), parentTransform->GetWorldTM());
|
||||
}
|
||||
m_suppressTransformChangedEvent = suppressTransformChangedEvent;
|
||||
|
||||
auto& parentChildIds = GetParentTransformComponent()->m_childrenEntityIds;
|
||||
if (parentChildIds.end() == AZStd::find(parentChildIds.begin(), parentChildIds.end(), GetEntityId()))
|
||||
|
||||
@@ -242,6 +242,9 @@ namespace AzToolsFramework
|
||||
// element is used rather than a data element.
|
||||
bool m_addNonUniformScaleButton = false;
|
||||
|
||||
// Used to check whether entity was just created vs manually reactivated. Set true after OnEntityActivated is called the first time.
|
||||
bool m_initialized = false;
|
||||
|
||||
// Deprecated
|
||||
AZ::InterpolationMode m_interpolatePosition;
|
||||
AZ::InterpolationMode m_interpolateRotation;
|
||||
|
||||
Reference in New Issue
Block a user