Merge branch 'stabilization/2106' of https://github.com/o3de/o3de into cgalvan/FixLCGraphNotOpeningOnEdit

This commit is contained in:
Chris Galvan
2021-07-07 12:58:28 -05:00
7 changed files with 63 additions and 17 deletions
@@ -13,6 +13,7 @@
#include "SequenceBatchRenderDialog.h"
#include <AzCore/Component/ComponentApplication.h>
#include <AzFramework/Windowing/WindowBus.h>
// Qt
@@ -1215,6 +1216,18 @@ void CSequenceBatchRenderDialog::OnKickIdleTimout()
// All done with our custom OnKickIdle, restore editor idle.
SetEnableEditorIdleProcessing(true);
}
//When we disable the editor idle processing. system tick is no longer invoked.
//so we call it here to ensure rendering + other systems are updated.
if (!m_editorIdleProcessingEnabled)
{
AZ::ComponentApplication* componentApplication = nullptr;
AZ::ComponentApplicationBus::BroadcastResult(componentApplication, &AZ::ComponentApplicationRequests::GetApplication);
if (componentApplication)
{
componentApplication->TickSystem();
}
}
}
void CSequenceBatchRenderDialog::OnKickIdle()
@@ -330,6 +330,7 @@ namespace AZ
prefabPlaceholderEntities.clear();
for (size_t curEntityIdx = 0; curEntityIdx < sliceEntities.size(); curEntityIdx++)
{
UpdateCachedTransform(*(sliceEntities[curEntityIdx]));
sourceInstance->AddEntity(*(sliceEntities[curEntityIdx]), entityAliases[curEntityIdx]);
}
@@ -631,12 +632,14 @@ namespace AZ
AZ_Assert(false, "Couldn't find nested instance %s", it->c_str());
}
}
UpdateCachedTransform(*entity);
addingInstance->AddEntity(*entity, mappingStruct.m_entityAlias);
addedEntityList.emplace_back(entity, addingInstance);
}
else
{
AZ_Assert(false, "Failed to find entity alias.");
UpdateCachedTransform(*entity);
nestedInstance->AddEntity(*entity);
addedEntityList.emplace_back(entity, nestedInstance.get());
}
@@ -781,6 +784,16 @@ namespace AZ
}
}
void SliceConverter::UpdateCachedTransform(const AZ::Entity& entity)
{
AzToolsFramework::Components::TransformComponent* transformComponent =
entity.FindComponent<AzToolsFramework::Components::TransformComponent>();
if (transformComponent)
{
transformComponent->UpdateCachedWorldTransform();
}
}
void SliceConverter::PrintPrefab(AzToolsFramework::Prefab::TemplateId templateId)
{
auto prefabSystemComponentInterface = AZ::Interface<AzToolsFramework::Prefab::PrefabSystemComponentInterface>::Get();
@@ -72,6 +72,7 @@ namespace AZ
bool ConvertSliceInstance(
AZ::SliceComponent::SliceInstance& instance, AZ::Data::Asset<AZ::SliceAsset>& sliceAsset,
AzToolsFramework::Prefab::TemplateReference nestedTemplate, AzToolsFramework::Prefab::Instance* topLevelInstance);
void UpdateCachedTransform(const AZ::Entity& entity);
void SetParentEntity(const AZ::Entity& entity, const AZ::EntityId& parentId, bool onlySetIfInvalid);
void PrintPrefab(AzToolsFramework::Prefab::TemplateId templateId);
bool SavePrefab(AZ::IO::PathView outputPath, AzToolsFramework::Prefab::TemplateId templateId);