Made StandardMultilayerPBR hide a layer's property groups when that layer is disabled.
ATOM-14688 Disable Individual Layers - Added new SetMaterialPropertyGroupVisibility functions to the material functors. - Updated the MaterialFunctor::EditorContext to include parameters for handling material property group metadata. - Updated the material inspector(s) to apply the property group visiblity changes from the material functor, to hide or show the property groups. - Moved some code from MaterialPropertyDescriptor.h/cpp to a new MaterialDynamicMetadata.h/cpp, since these aren't really related to the MaterialPropertyDescriptor code. It's more for material functors to use. - Also fixed the casing for the "GetMaterialPropertyValue_Image" lua function, since I was already in this code (ATOM-14793 "Fix Inconsistent Casing For LuaMaterialFunctorRuntimeContext") Tested in MaterialEditor and in in the main Editor's MaterialComponent property override inspector.
This commit is contained in:
@@ -124,12 +124,6 @@ namespace AZ
|
||||
->Value(ToString(MaterialPropertyOutputType::ShaderOption), MaterialPropertyOutputType::ShaderOption)
|
||||
;
|
||||
|
||||
serializeContext->Enum<MaterialPropertyVisibility>()
|
||||
->Value("Enabled", MaterialPropertyVisibility::Enabled)
|
||||
->Value("Disabled", MaterialPropertyVisibility::Disabled)
|
||||
->Value("Hidden", MaterialPropertyVisibility::Hidden)
|
||||
;
|
||||
|
||||
serializeContext->Enum<MaterialPropertyDataType>()
|
||||
->Value(ToString(MaterialPropertyDataType::Invalid), MaterialPropertyDataType::Invalid)
|
||||
->Value(ToString(MaterialPropertyDataType::Bool), MaterialPropertyDataType::Bool)
|
||||
@@ -153,14 +147,6 @@ namespace AZ
|
||||
;
|
||||
}
|
||||
|
||||
if (auto* behaviorContext = azrtti_cast<BehaviorContext*>(context))
|
||||
{
|
||||
behaviorContext
|
||||
->Enum<(int)MaterialPropertyVisibility::Enabled>("MaterialPropertyVisibility_Enabled")
|
||||
->Enum<(int)MaterialPropertyVisibility::Disabled>("MaterialPropertyVisibility_Disabled")
|
||||
->Enum<(int)MaterialPropertyVisibility::Hidden>("MaterialPropertyVisibility_Hidden");
|
||||
}
|
||||
|
||||
MaterialPropertyIndex::Reflect(context);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user