Addressed code review feedback, minor updates.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
This commit is contained in:
@@ -324,7 +324,7 @@ namespace AZ
|
||||
PropertyDefinition* FindProperty(AZStd::span<AZStd::string_view> parsedPropertyId, AZStd::span<AZStd::unique_ptr<PropertyGroup>> inPropertyGroupList);
|
||||
|
||||
// Function overloads for recursion, returns false to indicate that recursion should end.
|
||||
bool EnumeratePropertyGroups(const EnumeratePropertyGroupsCallback& callback, PropertyGroupStack* propertyGroupStack, const AZStd::vector<AZStd::unique_ptr<PropertyGroup>>& inPropertyGroupList) const;
|
||||
bool EnumeratePropertyGroups(const EnumeratePropertyGroupsCallback& callback, PropertyGroupStack& propertyGroupStack, const AZStd::vector<AZStd::unique_ptr<PropertyGroup>>& inPropertyGroupList) const;
|
||||
bool EnumerateProperties(const EnumeratePropertiesCallback& callback, MaterialNameContext nameContext, const AZStd::vector<AZStd::unique_ptr<PropertyGroup>>& inPropertyGroupList) const;
|
||||
|
||||
static void ExtendNameContext(MaterialNameContext& nameContext, const MaterialTypeSourceData::PropertyGroup& propertyGroup);
|
||||
|
||||
@@ -427,13 +427,13 @@ namespace AZ
|
||||
return parts;
|
||||
}
|
||||
|
||||
bool MaterialTypeSourceData::EnumeratePropertyGroups(const EnumeratePropertyGroupsCallback& callback, PropertyGroupStack* propertyGroupStack, const AZStd::vector<AZStd::unique_ptr<PropertyGroup>>& inPropertyGroupList) const
|
||||
bool MaterialTypeSourceData::EnumeratePropertyGroups(const EnumeratePropertyGroupsCallback& callback, PropertyGroupStack& propertyGroupStack, const AZStd::vector<AZStd::unique_ptr<PropertyGroup>>& inPropertyGroupList) const
|
||||
{
|
||||
for (auto& propertyGroup : inPropertyGroupList)
|
||||
{
|
||||
propertyGroupStack->push_back(propertyGroup.get());
|
||||
propertyGroupStack.push_back(propertyGroup.get());
|
||||
|
||||
if (!callback(*propertyGroupStack))
|
||||
if (!callback(propertyGroupStack))
|
||||
{
|
||||
return false; // Stop processing
|
||||
}
|
||||
@@ -443,7 +443,7 @@ namespace AZ
|
||||
return false; // Stop processing
|
||||
}
|
||||
|
||||
propertyGroupStack->pop_back();
|
||||
propertyGroupStack.pop_back();
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -457,7 +457,7 @@ namespace AZ
|
||||
}
|
||||
|
||||
PropertyGroupStack propertyGroupStack;
|
||||
return EnumeratePropertyGroups(callback, &propertyGroupStack, m_propertyLayout.m_propertyGroups);
|
||||
return EnumeratePropertyGroups(callback, propertyGroupStack, m_propertyLayout.m_propertyGroups);
|
||||
}
|
||||
|
||||
bool MaterialTypeSourceData::EnumerateProperties(const EnumeratePropertiesCallback& callback, MaterialNameContext nameContext, const AZStd::vector<AZStd::unique_ptr<PropertyGroup>>& inPropertyGroupList) const
|
||||
|
||||
+4
-4
@@ -275,7 +275,7 @@ namespace AZ
|
||||
|
||||
void MaterialPropertyInspector::AddPropertiesGroup()
|
||||
{
|
||||
// Copy all of the properties from the material asset to the source data that will be exported
|
||||
// Copy all of the properties from the material asset to the populate the inspector
|
||||
m_editData.m_materialTypeSourceData.EnumeratePropertyGroups(
|
||||
[this](const AZ::RPI::MaterialTypeSourceData::PropertyGroupStack& propertyGroupStack)
|
||||
{
|
||||
@@ -290,10 +290,10 @@ namespace AZ
|
||||
AZStd::vector<AZStd::string> groupNameVector;
|
||||
AZStd::vector<AZStd::string> groupDisplayNameVector;
|
||||
|
||||
for (auto& group : propertyGroupStack)
|
||||
for (auto& nextGroup : propertyGroupStack)
|
||||
{
|
||||
groupNameVector.push_back(group->GetName());
|
||||
groupDisplayNameVector.push_back(!group->GetDisplayName().empty() ? group->GetDisplayName() : group->GetName());
|
||||
groupNameVector.push_back(nextGroup->GetName());
|
||||
groupDisplayNameVector.push_back(!nextGroup->GetDisplayName().empty() ? nextGroup->GetDisplayName() : nextGroup->GetName());
|
||||
}
|
||||
|
||||
AZStd::string groupId;
|
||||
|
||||
Reference in New Issue
Block a user