@@ -202,7 +202,7 @@ namespace AzToolsFramework
|
||||
virtual void OnSaveStreamForGameFailure(AZStd::string_view /*failureString*/) {}
|
||||
|
||||
//! Preserve entity order when re-parenting entities
|
||||
virtual void ForceAddEntitiesToBack(bool /*forceAddToBack*/) {}
|
||||
virtual void SetForceAddEntitiesToBackFlag(bool /*forceAddToBack*/) {}
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -1157,7 +1157,7 @@ namespace AzToolsFramework
|
||||
|
||||
bool CloneInstantiatedEntities(const EntityIdSet& entitiesToClone, EntityIdSet& clonedEntities)
|
||||
{
|
||||
EditorEntityContextNotificationBus::Broadcast(&EditorEntityContextNotification::ForceAddEntitiesToBack, true);
|
||||
EditorEntityContextNotificationBus::Broadcast(&EditorEntityContextNotification::SetForceAddEntitiesToBackFlag, true);
|
||||
ScopedUndoBatch undoBatch("Clone Selection");
|
||||
|
||||
// Track the mapping of source to cloned entity. This both helps make sure that an entity is not accidentally
|
||||
@@ -1199,7 +1199,7 @@ namespace AzToolsFramework
|
||||
// Also replace the selection with the entities that have been cloned.
|
||||
Internal::UpdateUndoStackAndSelectClonedEntities(allEntityClonesContainer.m_entities, undoBatch);
|
||||
|
||||
EditorEntityContextNotificationBus::Broadcast(&EditorEntityContextNotification::ForceAddEntitiesToBack, false);
|
||||
EditorEntityContextNotificationBus::Broadcast(&EditorEntityContextNotification::SetForceAddEntitiesToBackFlag, false);
|
||||
|
||||
for (const AZ::Entity* entity : allEntityClonesContainer.m_entities)
|
||||
{
|
||||
|
||||
@@ -643,7 +643,7 @@ namespace AzToolsFramework
|
||||
}
|
||||
}
|
||||
|
||||
void EditorEntityModel::ForceAddEntitiesToBack(bool forceAddToBack)
|
||||
void EditorEntityModel::SetForceAddEntitiesToBackFlag(bool forceAddToBack)
|
||||
{
|
||||
m_forceAddToBack = forceAddToBack;
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ namespace AzToolsFramework
|
||||
void OnEntityStreamLoadBegin() override;
|
||||
void OnEntityStreamLoadSuccess() override;
|
||||
void OnEntityStreamLoadFailed() override;
|
||||
void ForceAddEntitiesToBack(bool forceAddToBack) override;
|
||||
void SetForceAddEntitiesToBackFlag(bool forceAddToBack) override;
|
||||
|
||||
////////////////////////////////////////////////
|
||||
// AzFramework::EntityContextEventBus::Handler
|
||||
|
||||
@@ -185,7 +185,7 @@ namespace AzToolsFramework
|
||||
|
||||
// Parent the non-container top level entities to the container entity.
|
||||
// Parenting the top level container entities will be done during the creation of links.
|
||||
EditorEntityContextNotificationBus::Broadcast(&EditorEntityContextNotification::ForceAddEntitiesToBack, true);
|
||||
EditorEntityContextNotificationBus::Broadcast(&EditorEntityContextNotification::SetForceAddEntitiesToBackFlag, true);
|
||||
for (AZ::Entity* topLevelEntity : topLevelEntities)
|
||||
{
|
||||
if (!IsInstanceContainerEntity(topLevelEntity->GetId()))
|
||||
@@ -193,7 +193,7 @@ namespace AzToolsFramework
|
||||
AZ::TransformBus::Event(topLevelEntity->GetId(), &AZ::TransformBus::Events::SetParent, containerEntityId);
|
||||
}
|
||||
}
|
||||
EditorEntityContextNotificationBus::Broadcast(&EditorEntityContextNotification::ForceAddEntitiesToBack, false);
|
||||
EditorEntityContextNotificationBus::Broadcast(&EditorEntityContextNotification::SetForceAddEntitiesToBackFlag, false);
|
||||
|
||||
// Update the template of the instance since the entities are modified since the template creation.
|
||||
Prefab::PrefabDom serializedInstance;
|
||||
|
||||
Reference in New Issue
Block a user