Changing material inspector to use indicator icons instead of highlighting modified properties
Added a blank placeholder image to account for changes to indention when indicator icons are active Added parameter to inspector constructor for specifying leaf property indention size Signed-off-by: Guthrie Adams <guthadam@amazon.com>
This commit is contained in:
+2
-1
@@ -42,7 +42,8 @@ namespace AtomToolsFramework
|
||||
QWidget* parent = {},
|
||||
const AZ::u32 saveStateKey = {},
|
||||
const AzToolsFramework::InstanceDataHierarchy::ValueComparisonFunction& valueComparisonFunction = {},
|
||||
const AzToolsFramework::IndicatorQueryFunction& indicatorQueryFunction = {});
|
||||
const AzToolsFramework::IndicatorQueryFunction& indicatorQueryFunction = {},
|
||||
int leafIndentSize = 16);
|
||||
|
||||
void Refresh() override;
|
||||
void Rebuild() override;
|
||||
|
||||
+4
-2
@@ -20,7 +20,8 @@ namespace AtomToolsFramework
|
||||
QWidget* parent,
|
||||
const AZ::u32 saveStateKey,
|
||||
const AzToolsFramework::InstanceDataHierarchy::ValueComparisonFunction& valueComparisonFunction,
|
||||
const AzToolsFramework::IndicatorQueryFunction& indicatorQueryFunction)
|
||||
const AzToolsFramework::IndicatorQueryFunction& indicatorQueryFunction,
|
||||
int leafIndentSize)
|
||||
: InspectorGroupWidget(parent)
|
||||
{
|
||||
AZ::SerializeContext* context = nullptr;
|
||||
@@ -33,7 +34,8 @@ namespace AtomToolsFramework
|
||||
|
||||
m_propertyEditor = new AzToolsFramework::ReflectedPropertyEditor(this);
|
||||
m_propertyEditor->SetHideRootProperties(true);
|
||||
m_propertyEditor->SetAutoResizeLabels(true);
|
||||
m_propertyEditor->SetAutoResizeLabels(false);
|
||||
m_propertyEditor->SetLeafIndentation(leafIndentSize);
|
||||
m_propertyEditor->SetValueComparisonFunction(valueComparisonFunction);
|
||||
m_propertyEditor->SetIndicatorQueryFunction(indicatorQueryFunction);
|
||||
m_propertyEditor->SetSavedStateKey(saveStateKey);
|
||||
|
||||
@@ -150,6 +150,7 @@ namespace AtomToolsFramework
|
||||
ComparePropertyValues<AZ::Vector4>(valueA, valueB) ||
|
||||
ComparePropertyValues<AZ::Color>(valueA, valueB) ||
|
||||
ComparePropertyValues<AZ::Data::AssetId>(valueA, valueB) ||
|
||||
ComparePropertyValues<AZ::Data::Asset<AZ::Data::AssetData>>(valueA, valueB) ||
|
||||
ComparePropertyValues<AZ::Data::Asset<AZ::RPI::ImageAsset>>(valueA, valueB) ||
|
||||
ComparePropertyValues<AZ::Data::Asset<AZ::RPI::StreamingImageAsset>>(valueA, valueB) ||
|
||||
ComparePropertyValues<AZ::Data::Asset<AZ::RPI::MaterialAsset>>(valueA, valueB) ||
|
||||
|
||||
Reference in New Issue
Block a user