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:
+7
@@ -18,6 +18,7 @@
|
||||
#include <AzCore/std/any.h>
|
||||
|
||||
#include <AtomToolsFramework/DynamicProperty/DynamicProperty.h>
|
||||
#include <AtomToolsFramework/DynamicProperty/DynamicPropertyGroup.h>
|
||||
|
||||
namespace MaterialEditor
|
||||
{
|
||||
@@ -77,6 +78,12 @@ namespace MaterialEditor
|
||||
//! @param documentId unique id of material document for which the notification is sent
|
||||
//! @param property object containing the property value and configuration that was modified
|
||||
virtual void OnDocumentPropertyConfigModified([[maybe_unused]] const AZ::Uuid& documentId, [[maybe_unused]] const AtomToolsFramework::DynamicProperty& property) {}
|
||||
|
||||
//! Signal that the property group visibility has been changed.
|
||||
//! @param documentId unique id of material document for which the notification is sent
|
||||
//! @param groupId id of the group that changed
|
||||
//! @param visible whether the property group is visible
|
||||
virtual void OnDocumentPropertyGroupVisibilityChanged([[maybe_unused]] const AZ::Uuid& documentId, [[maybe_unused]] const AZ::Name& groupId, [[maybe_unused]] bool visible) {}
|
||||
};
|
||||
|
||||
using MaterialDocumentNotificationBus = AZ::EBus<MaterialDocumentNotifications>;
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <AzCore/std/any.h>
|
||||
|
||||
#include <AtomToolsFramework/DynamicProperty/DynamicProperty.h>
|
||||
#include <AtomToolsFramework/DynamicProperty/DynamicPropertyGroup.h>
|
||||
|
||||
namespace AZ
|
||||
{
|
||||
@@ -67,6 +68,10 @@ namespace MaterialEditor
|
||||
//! Returns a property object
|
||||
//! If the document is not open or the id can't be found, an invalid property is returned.
|
||||
virtual const AtomToolsFramework::DynamicProperty& GetProperty(const AZ::Name& propertyFullName) const = 0;
|
||||
|
||||
//! Returns whether a property group is visible
|
||||
//! If the document is not open or the id can't be found, returns false.
|
||||
virtual bool IsPropertyGroupVisible(const AZ::Name& propertyGroupFullName) const = 0;
|
||||
|
||||
//! Modify material property value
|
||||
virtual void SetPropertyValue(const AZ::Name& propertyFullName, const AZStd::any& value) = 0;
|
||||
|
||||
Reference in New Issue
Block a user