You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
o3de/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material
santorac 8fbd2aaaf5 Tied up a few loose ends to support deeply nested property groups.
Simplified the call back for MaterialTypeSourceData::EnumeratePropertyGroups while also providing more data.
Made the Material Inspector join nested property group display names to be like "Layer 1 | Base Color", since the leaf property groups are shown as a flat list in the inspector.
Fixed CreateMaterialAssetFromSourceData to include the imported json files in the list of sourceDependencies. This triggers the Material Editor to hot-reload when one of these json files changes.
Updated a few places that were still assuming only one level of property group.
Updated EditorMaterialComponentInspector to apply the per-property-group material functors, before it was still only applying the top-level onces.
Moved some accessor function implementations to the cpp files, per feedback on another already-merged PR.

Testing:
Made changes to MinimalMultilayerPbr (in AtomSampleViewer) to use nested property groups, and saw the correct behavior in the Material Editor's property inspector.
Used MaterialComponent's property inspector to edit a StandardPbr material instance. Confrimed that functors were correctly controlling property visibility by enabling and disabling things like emissive and clear coat.
Used MaterialComponent's property inspector to edit a MinimalMultilayerPbr material instance. Saw all the expected groups and properties show up. Confirmed that per-group functors were correctly controlling property visibility.
Used MaterialComponent's property inspector to export a material instance and confirmed the .material file included the expected properties.

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
4 years ago
..
LuaMaterialFunctor.cpp Added support for deeply nested material property groups. 4 years ago
MaterialAsset.cpp Added code comments. 4 years ago
MaterialAssetCreator.cpp Switched back to making MaterialAsset::GetPropertyValues automatically finalize the material asset. I realized that it's too burdensome to expect client code to call Finalize on the MaterialAsset; every code that calls GetPropertyValues would have to call Finalize(). Instead of using const_cast in GetPropertyValues like I was doing before, I just changed GetPropertyValues to be a non-const function. There were a few places in Decal code I had to update to pass non-const MaterialAsset pointers. This isn't ideal, but I think it's better than the alternatives. 4 years ago
MaterialDynamicMetadata.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
MaterialFunctor.cpp Renamed MaterialFunctor code to use propertyId instead of propertyName, because 'name' is us for the short name of a property and 'ID' is for the full name including groups. 4 years ago
MaterialNameContext.cpp Tied up a few loose ends to support deeply nested property groups. 4 years ago
MaterialPropertiesLayout.cpp Updated the naming convention for material property "names" vs "IDs". 4 years ago
MaterialPropertyDescriptor.cpp Got the unit tests working again. 4 years ago
MaterialPropertyValue.cpp Fixed MaterialPropertyValue::FromAny to preserve the Hint string when converting Asset objects. This fixed an issue where the hint didn't show up in the Material Component's instance inspector. 4 years ago
MaterialTypeAsset.cpp Updated all array_view uses with the C++20 span. (#7157) 4 years ago
MaterialTypeAssetCreator.cpp Merged MaterialAssetCreatorCommon class into MaterialTypeAssetCreator because it is no longer needed for MaterialAssetCreator. 4 years ago
MaterialVersionUpdate.cpp First pass at reworking and formalizing the way deferred material asset baking works. The feature basically works but needs more testing. 4 years ago
ShaderCollection.cpp cherry-pick 48f3bb7d 4 years ago