From e1d2115cabcf961d777daf9c444a728debf431c6 Mon Sep 17 00:00:00 2001 From: mnaumov Date: Thu, 10 Jun 2021 12:05:30 -0700 Subject: [PATCH] ElementName override --- .../CommonFeatures/Code/Source/Mesh/EditorMeshStats.cpp | 6 ++++++ .../CommonFeatures/Code/Source/Mesh/EditorMeshStats.h | 1 + 2 files changed, 7 insertions(+) diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Mesh/EditorMeshStats.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Mesh/EditorMeshStats.cpp index 2f65ca83df..0830b6d83f 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Mesh/EditorMeshStats.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Mesh/EditorMeshStats.cpp @@ -71,9 +71,15 @@ namespace AZ ->Attribute(AZ::Edit::Attributes::NameLabelOverride, "") ->Attribute(AZ::Edit::Attributes::ContainerCanBeModified, false) ->Attribute(AZ::Edit::Attributes::AutoExpand, true) + ->Attribute(AZ::Edit::Attributes::IndexedChildNameLabelOverride, &EditorMeshStats::GetLodLabel) ; } } } + + AZStd::string EditorMeshStats::GetLodLabel(int index) const + { + return AZStd::string::format("LOD %d", index); + } } // namespace Render } // namespace AZ diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Mesh/EditorMeshStats.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Mesh/EditorMeshStats.h index 111ec6d27b..6bdce7c008 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Mesh/EditorMeshStats.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Mesh/EditorMeshStats.h @@ -39,6 +39,7 @@ namespace AZ AZ_CLASS_ALLOCATOR(EditorMeshStats, SystemAllocator, 0); static void Reflect(ReflectContext* context); + AZStd::string GetLodLabel(int index) const; AZStd::vector m_meshStatsForLod; };