Merge branch 'main' into cgalvan/EntityHelperRefactor
This commit is contained in:
@@ -438,45 +438,8 @@ void CComponentEntityObject::OnEntityIconChanged(const AZ::Data::AssetId& entity
|
||||
SetupEntityIcon();
|
||||
}
|
||||
|
||||
void CComponentEntityObject::OnParentChanged([[maybe_unused]] AZ::EntityId oldParent, AZ::EntityId newParent)
|
||||
void CComponentEntityObject::OnParentChanged([[maybe_unused]] AZ::EntityId oldParent, [[maybe_unused]] AZ::EntityId newParent)
|
||||
{
|
||||
return;
|
||||
|
||||
if (m_parentingReentryGuard) // Ignore if action originated from Sandbox.
|
||||
{
|
||||
EditorActionScope parentChange(m_parentingReentryGuard);
|
||||
|
||||
CComponentEntityObject* currentParent = static_cast<CComponentEntityObject*>(GetParent());
|
||||
|
||||
if (!currentParent && !newParent.IsValid())
|
||||
{
|
||||
// No change in parent.
|
||||
return;
|
||||
}
|
||||
|
||||
if (currentParent && currentParent->GetAssociatedEntityId() == newParent)
|
||||
{
|
||||
// No change in parent.
|
||||
return;
|
||||
}
|
||||
|
||||
DetachThis();
|
||||
|
||||
if (newParent.IsValid())
|
||||
{
|
||||
CComponentEntityObject* componentEntity = CComponentEntityObject::FindObjectForEntity(newParent);
|
||||
|
||||
if (componentEntity)
|
||||
{
|
||||
// The action is originating from Sandbox, so ignore the return events.
|
||||
EditorActionScope transformChange(m_transformReentryGuard);
|
||||
|
||||
componentEntity->AttachChild(this);
|
||||
}
|
||||
}
|
||||
|
||||
InvalidateTM(0);
|
||||
}
|
||||
}
|
||||
|
||||
void CComponentEntityObject::OnMeshCreated(const AZ::Data::Asset<AZ::Data::AssetData>& asset)
|
||||
|
||||
@@ -2785,26 +2785,6 @@ AZ::u32 SandboxIntegrationManager::SetState(AZ::u32 state)
|
||||
return 0;
|
||||
}
|
||||
|
||||
AZ::u32 SandboxIntegrationManager::SetStateFlag(AZ::u32 state)
|
||||
{
|
||||
if (m_dc)
|
||||
{
|
||||
return m_dc->SetStateFlag(state);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
AZ::u32 SandboxIntegrationManager::ClearStateFlag(AZ::u32 state)
|
||||
{
|
||||
if (m_dc)
|
||||
{
|
||||
return m_dc->ClearStateFlag(state);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SandboxIntegrationManager::PushMatrix(const AZ::Transform& tm)
|
||||
{
|
||||
if (m_dc)
|
||||
|
||||
@@ -268,8 +268,6 @@ private:
|
||||
bool SetDrawInFrontMode(bool bOn) override;
|
||||
AZ::u32 GetState() override;
|
||||
AZ::u32 SetState(AZ::u32 state) override;
|
||||
AZ::u32 SetStateFlag(AZ::u32 state) override;
|
||||
AZ::u32 ClearStateFlag(AZ::u32 state) override;
|
||||
void PushMatrix(const AZ::Transform& tm) override;
|
||||
void PopMatrix() override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user