Removed unused legacy show icons option

Signed-off-by: Chris Galvan <chgalvan@amazon.com>
This commit is contained in:
Chris Galvan
2022-01-12 11:13:40 -06:00
parent a690c76ad4
commit e31fa88c00
9 changed files with 0 additions and 282 deletions
@@ -723,97 +723,6 @@ CComponentEntityObject* CComponentEntityObject::FindObjectForEntity(AZ::EntityId
return nullptr;
}
void CComponentEntityObject::Display(DisplayContext& dc)
{
if (!(dc.flags & DISPLAY_2D))
{
m_entityIconVisible = false;
}
bool displaySelectionHelper = false;
if (!CanBeDrawn(dc, displaySelectionHelper))
{
return;
}
DrawDefault(dc);
bool showIcons = m_hasIcon;
if (showIcons)
{
SEditorSettings* editorSettings = GetIEditor()->GetEditorSettings();
if (!editorSettings->viewports.bShowIcons && !editorSettings->viewports.bShowSizeBasedIcons)
{
showIcons = false;
}
}
if (m_entityId.IsValid())
{
// Draw link to parent if this or the parent object are selected.
{
AZ::EntityId parentId;
EBUS_EVENT_ID_RESULT(parentId, m_entityId, AZ::TransformBus, GetParentId);
if (parentId.IsValid())
{
bool isParentVisible = false;
AzToolsFramework::EditorEntityInfoRequestBus::EventResult(isParentVisible, parentId, &AzToolsFramework::EditorEntityInfoRequestBus::Events::IsVisible);
CComponentEntityObject* parentObject = CComponentEntityObject::FindObjectForEntity(parentId);
if (isParentVisible && (IsSelected() || (parentObject && parentObject->IsSelected())))
{
const QColor kLinkColorParent(0, 255, 255);
const QColor kLinkColorChild(0, 0, 255);
AZ::Vector3 parentTranslation;
EBUS_EVENT_ID_RESULT(parentTranslation, parentId, AZ::TransformBus, GetWorldTranslation);
dc.DrawLine(AZVec3ToLYVec3(parentTranslation), GetWorldTM().GetTranslation(), kLinkColorParent, kLinkColorChild);
}
}
}
// Don't draw icons if we have an ancestor in the same location that has an icon - makes sure
// ancestor icons draw on top and are able to be selected over children. Also check if a descendant
// is selected at the same location. In cases of entity hierarchies where numerous ancestors have
// no position offset, we need this so the ancestors don't draw over us when we're selected
if (showIcons)
{
if ((dc.flags & DISPLAY_2D) ||
IsSelected() ||
IsAncestorIconDrawingAtSameLocation() ||
IsDescendantSelectedAtSameLocation())
{
showIcons = false;
}
}
// Allow components to override in-editor visualization.
{
const AzFramework::DisplayContextRequestGuard displayContextGuard(dc);
AzFramework::DebugDisplayRequestBus::BusPtr debugDisplayBus;
AzFramework::DebugDisplayRequestBus::Bind(
debugDisplayBus, AzFramework::g_defaultSceneEntityDebugDisplayId);
AZ_Assert(debugDisplayBus, "Invalid DebugDisplayRequestBus.");
AzFramework::DebugDisplayRequests* debugDisplay =
AzFramework::DebugDisplayRequestBus::FindFirstHandler(debugDisplayBus);
AzFramework::EntityDebugDisplayEventBus::Event(
m_entityId, &AzFramework::EntityDebugDisplayEvents::DisplayEntityViewport,
AzFramework::ViewportInfo{ dc.GetView()->asCViewport()->GetViewportId() },
*debugDisplay);
}
}
}
void CComponentEntityObject::DrawDefault(DisplayContext& dc, const QColor& labelColor)
{
CEntityObject::DrawDefault(dc, labelColor);
DrawAccent(dc);
}
bool CComponentEntityObject::IsIsolated() const
{
return m_isIsolated;