Merge branch 'main' into cgalvan/RemoveLensFlareEditor
This commit is contained in:
@@ -27,11 +27,6 @@
|
||||
// ComponentEntityEditorPlugin
|
||||
#include "Plugins/ComponentEntityEditorPlugin/Objects/ComponentEntityObject.h"
|
||||
|
||||
// LmbrCentral
|
||||
#include <LmbrCentral/Rendering/MeshComponentBus.h>
|
||||
#include <LmbrCentral/Rendering/GeomCacheComponentBus.h>
|
||||
|
||||
|
||||
static const float kEnoughFarDistance(5000.0f);
|
||||
|
||||
CSurfaceInfoPicker::CSurfaceInfoPicker()
|
||||
@@ -185,19 +180,6 @@ void CSurfaceInfoPicker::FindNearestInfoFromEntities(
|
||||
AZ::EntityId id;
|
||||
AzToolsFramework::ComponentEntityObjectRequestBus::EventResult(id, entityObject, &AzToolsFramework::ComponentEntityObjectRequestBus::Events::GetAssociatedEntityId);
|
||||
|
||||
AZ::EBusAggregateResults<IStatObj*> statObjs;
|
||||
LmbrCentral::LegacyMeshComponentRequestBus::EventResult(statObjs, id, &LmbrCentral::LegacyMeshComponentRequestBus::Events::GetStatObj);
|
||||
|
||||
// If the entity has a MeshComponent, it will hit here
|
||||
for (IStatObj* statObj : statObjs.values)
|
||||
{
|
||||
hit = RayIntersection(vWorldRaySrc, vWorldRayDir, nullptr, statObj, object->GetWorldTM(), outHitInfo, &statObjDefaultMaterial);
|
||||
if (hit)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// If the entity has an ActorComponent or another component that overrides RenderNodeRequestBus, it will hit here
|
||||
if (!hit)
|
||||
{
|
||||
@@ -237,14 +219,6 @@ void CSurfaceInfoPicker::FindNearestInfoFromEntities(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If the entity has a GeometryCacheComponent it will hit here
|
||||
if (!hit)
|
||||
{
|
||||
IGeomCacheRenderNode* geomCacheRenderNode = nullptr;
|
||||
LmbrCentral::GeometryCacheComponentRequestBus::EventResult(geomCacheRenderNode, id, &LmbrCentral::GeometryCacheComponentRequestBus::Events::GetGeomCacheRenderNode);
|
||||
hit = RayIntersection_IGeomCacheRenderNode(vWorldRaySrc, vWorldRayDir, geomCacheRenderNode, &pickedMaterial, object->GetWorldTM(), outHitInfo);
|
||||
}
|
||||
}
|
||||
|
||||
if (hit)
|
||||
|
||||
@@ -43,7 +43,6 @@
|
||||
#include <AzToolsFramework/ToolsComponents/EditorEntityIconComponentBus.h>
|
||||
#include <AzToolsFramework/Undo/UndoCacheInterface.h>
|
||||
#include <LmbrCentral/Rendering/RenderNodeBus.h>
|
||||
#include <LmbrCentral/Rendering/MeshComponentBus.h>
|
||||
#include <LmbrCentral/Rendering/MaterialOwnerBus.h>
|
||||
|
||||
#include <IDisplayViewport.h>
|
||||
@@ -112,7 +111,6 @@ void CComponentEntityObject::AssignEntity(AZ::Entity* entity, bool destroyOld)
|
||||
{
|
||||
AZ::TransformNotificationBus::Handler::BusDisconnect();
|
||||
LmbrCentral::RenderBoundsNotificationBus::Handler::BusDisconnect();
|
||||
LmbrCentral::MeshComponentNotificationBus::Handler::BusDisconnect();
|
||||
AzToolsFramework::ComponentEntityEditorRequestBus::Handler::BusDisconnect();
|
||||
AZ::EntityBus::Handler::BusDisconnect();
|
||||
AzToolsFramework::ComponentEntityObjectRequestBus::Handler::BusDisconnect();
|
||||
@@ -158,7 +156,6 @@ void CComponentEntityObject::AssignEntity(AZ::Entity* entity, bool destroyOld)
|
||||
|
||||
AZ::TransformNotificationBus::Handler::BusConnect(m_entityId);
|
||||
LmbrCentral::RenderBoundsNotificationBus::Handler::BusConnect(m_entityId);
|
||||
LmbrCentral::MeshComponentNotificationBus::Handler::BusConnect(m_entityId);
|
||||
AzToolsFramework::ComponentEntityEditorRequestBus::Handler::BusConnect(m_entityId);
|
||||
AZ::EntityBus::Handler::BusConnect(m_entityId);
|
||||
AzToolsFramework::ComponentEntityObjectRequestBus::Handler::BusConnect(this);
|
||||
@@ -399,15 +396,6 @@ void CComponentEntityObject::OnParentChanged([[maybe_unused]] AZ::EntityId oldPa
|
||||
{
|
||||
}
|
||||
|
||||
void CComponentEntityObject::OnMeshCreated(const AZ::Data::Asset<AZ::Data::AssetData>& asset)
|
||||
{
|
||||
(void)asset;
|
||||
|
||||
// Need to recalculate bounds when the mesh changes.
|
||||
OnRenderBoundsReset();
|
||||
ValidateMeshStatObject();
|
||||
}
|
||||
|
||||
void CComponentEntityObject::OnRenderBoundsReset()
|
||||
{
|
||||
CEntityObject::InvalidateTM(0);
|
||||
@@ -950,9 +938,7 @@ void CComponentEntityObject::DrawDefault(DisplayContext& dc, const QColor& label
|
||||
|
||||
IStatObj* CComponentEntityObject::GetIStatObj()
|
||||
{
|
||||
IStatObj* statObj = nullptr;
|
||||
LmbrCentral::LegacyMeshComponentRequestBus::EventResult(statObj, m_entityId, &LmbrCentral::LegacyMeshComponentRequests::GetStatObj);
|
||||
return statObj;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool CComponentEntityObject::IsIsolated() const
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
#include <QtViewPane.h>
|
||||
|
||||
#include "../Editor/Objects/EntityObject.h"
|
||||
#include <LmbrCentral/Rendering/MeshComponentBus.h>
|
||||
#include <LmbrCentral/Rendering/RenderBoundsBus.h>
|
||||
#endif
|
||||
|
||||
@@ -43,7 +42,6 @@ class CComponentEntityObject
|
||||
, private AzToolsFramework::EditorEntityIconComponentNotificationBus::Handler
|
||||
, private AZ::TransformNotificationBus::Handler
|
||||
, private LmbrCentral::RenderBoundsNotificationBus::Handler
|
||||
, private LmbrCentral::MeshComponentNotificationBus::Handler
|
||||
, private AzToolsFramework::ComponentEntityEditorRequestBus::Handler
|
||||
, private AzToolsFramework::ComponentEntityObjectRequestBus::Handler
|
||||
, private AZ::EntityBus::Handler
|
||||
@@ -131,11 +129,6 @@ public:
|
||||
void OnParentChanged(AZ::EntityId oldParent, AZ::EntityId newParent) override;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//! MeshComponentNotificationBus
|
||||
void OnMeshCreated(const AZ::Data::Asset<AZ::Data::AssetData>& asset) override;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//! RenderBoundsNotificationBus
|
||||
void OnRenderBoundsReset() override;
|
||||
|
||||
Reference in New Issue
Block a user