Fixed issues after merging latest main, as well as some edge cases I didn't notice before.

The structure of InspectorWidget::m_groups changed, so I had to update my new code accordingly.
Updated the InspectorWidget::m_groups code a bit to be more readable.
Discovered the initial property group visiblity state wasn't being set correctly when a material was first opened, so groups weren't initially hidden when they should have been. This had to be fixed in different ways for MaterialEditor's inspector and MaterialComponent's inspector.

ATOM-14688 Disable Individual Layers
This commit is contained in:
Chris Santora
2021-05-12 23:28:05 -07:00
parent 37a1b77d50
commit e429c8e06a
5 changed files with 53 additions and 26 deletions
@@ -198,6 +198,11 @@ namespace MaterialEditor
&group, &group, group.TYPEINFO_Uuid(), this, this, GetGroupSaveStateKey(groupNameId),
[this](const auto source, const auto target) { return CompareInstanceNodeProperties(source, target); });
AddGroup(groupNameId, groupDisplayName, groupDescription, propertyGroupWidget);
bool isGroupVisible = false;
MaterialDocumentRequestBus::EventResult(
isGroupVisible, m_documentId, &MaterialDocumentRequestBus::Events::IsPropertyGroupVisible, AZ::Name{groupNameId});
SetGroupVisible(groupNameId, isGroupVisible);
}
}