ATOM-14065 fix problems with material editor details group property descriptions

Moved the code that automatically appended a script variable name to a property description out of the dynamic property class and into the material property conversion utility functions.

Added proper descriptions for the material type and parent material placeholder properties

https://jira.agscollab.com/browse/ATOM-14065
This commit is contained in:
guthadam
2021-05-03 00:13:45 -05:00
parent 781415755d
commit 9d0f9e9e3a
4 changed files with 18 additions and 7 deletions
@@ -762,6 +762,8 @@ namespace MaterialEditor
// in the hierarchy are applied
m_materialTypeSourceData.EnumerateProperties([this, &parentPropertyValues](const AZStd::string& groupNameId, const AZStd::string& propertyNameId, const auto& propertyDefinition) {
AtomToolsFramework::DynamicPropertyConfig propertyConfig;
// Assign id before conversion so it can be used in dynamic description
propertyConfig.m_id = MaterialPropertyId(groupNameId, propertyNameId).GetCStr();
const auto& propertyIndex = m_materialAsset->GetMaterialPropertiesLayout()->FindPropertyIndex(propertyConfig.m_id);
@@ -792,7 +794,8 @@ namespace MaterialEditor
propertyConfig.m_nameId = "materialType";
propertyConfig.m_displayName = "Material Type";
propertyConfig.m_groupName = "Details";
propertyConfig.m_description = propertyConfig.m_displayName;
propertyConfig.m_description = "The material type defines the layout, properties, default values, shader connections, and other "
"data needed to create and edit a derived material.";
propertyConfig.m_defaultValue = AZStd::any(materialTypeAsset);
propertyConfig.m_originalValue = propertyConfig.m_defaultValue;
propertyConfig.m_parentValue = propertyConfig.m_defaultValue;
@@ -806,7 +809,8 @@ namespace MaterialEditor
propertyConfig.m_nameId = "parentMaterial";
propertyConfig.m_displayName = "Parent Material";
propertyConfig.m_groupName = "Details";
propertyConfig.m_description = propertyConfig.m_displayName;
propertyConfig.m_description =
"The parent material provides an initial configuration whose properties are inherited and overriden by a derived material.";
propertyConfig.m_defaultValue = AZStd::any(parentMaterialAsset);
propertyConfig.m_originalValue = propertyConfig.m_defaultValue;
propertyConfig.m_parentValue = propertyConfig.m_defaultValue;