@ -155,9 +155,9 @@ namespace AZ
, m_materialPropertyDependencies ( materialPropertyDependencies )
{ }
const MaterialPropertyDynamicMetadata * MaterialFunctor : : EditorContext : : GetMaterialPropertyMetadata ( const Name & property Name ) const
const MaterialPropertyDynamicMetadata * MaterialFunctor : : EditorContext : : GetMaterialPropertyMetadata ( const Name & property Id ) const
{
return QueryMaterialPropertyMetadata ( property Name ) ;
return QueryMaterialPropertyMetadata ( property Id ) ;
}
const MaterialPropertyDynamicMetadata * MaterialFunctor : : EditorContext : : GetMaterialPropertyMetadata ( const MaterialPropertyIndex & index ) const
@ -166,9 +166,9 @@ namespace AZ
return GetMaterialPropertyMetadata ( name ) ;
}
const MaterialPropertyGroupDynamicMetadata * MaterialFunctor : : EditorContext : : GetMaterialPropertyGroupMetadata ( const Name & property Name ) const
const MaterialPropertyGroupDynamicMetadata * MaterialFunctor : : EditorContext : : GetMaterialPropertyGroupMetadata ( const Name & property Id ) const
{
return QueryMaterialPropertyGroupMetadata ( property Name ) ;
return QueryMaterialPropertyGroupMetadata ( property Id ) ;
}
bool MaterialFunctor : : EditorContext : : SetMaterialPropertyGroupVisibility ( const Name & propertyGroupName , MaterialPropertyGroupVisibility visibility )
@ -188,9 +188,9 @@ namespace AZ
return true ;
}
bool MaterialFunctor : : EditorContext : : SetMaterialPropertyVisibility ( const Name & property Name , MaterialPropertyVisibility visibility )
bool MaterialFunctor : : EditorContext : : SetMaterialPropertyVisibility ( const Name & property Id , MaterialPropertyVisibility visibility )
{
MaterialPropertyDynamicMetadata * metadata = QueryMaterialPropertyMetadata ( property Name ) ;
MaterialPropertyDynamicMetadata * metadata = QueryMaterialPropertyMetadata ( property Id ) ;
if ( ! metadata )
{
return false ;
@ -199,7 +199,7 @@ namespace AZ
if ( metadata - > m_visibility ! = visibility )
{
metadata - > m_visibility = visibility ;
m_updatedPropertiesOut . insert ( property Name ) ;
m_updatedPropertiesOut . insert ( property Id ) ;
}
return true ;
@ -211,9 +211,9 @@ namespace AZ
return SetMaterialPropertyVisibility ( name , visibility ) ;
}
bool MaterialFunctor : : EditorContext : : SetMaterialPropertyDescription ( const Name & property Name , AZStd : : string description )
bool MaterialFunctor : : EditorContext : : SetMaterialPropertyDescription ( const Name & property Id , AZStd : : string description )
{
MaterialPropertyDynamicMetadata * metadata = QueryMaterialPropertyMetadata ( property Name ) ;
MaterialPropertyDynamicMetadata * metadata = QueryMaterialPropertyMetadata ( property Id ) ;
if ( ! metadata )
{
return false ;
@ -222,7 +222,7 @@ namespace AZ
if ( metadata - > m_description ! = description )
{
metadata - > m_description = description ;
m_updatedPropertiesOut . insert ( property Name ) ;
m_updatedPropertiesOut . insert ( property Id ) ;
}
return true ;
@ -234,9 +234,9 @@ namespace AZ
return SetMaterialPropertyDescription ( name , description ) ;
}
bool MaterialFunctor : : EditorContext : : SetMaterialPropertyMinValue ( const Name & property Name , const MaterialPropertyValue & min )
bool MaterialFunctor : : EditorContext : : SetMaterialPropertyMinValue ( const Name & property Id , const MaterialPropertyValue & min )
{
MaterialPropertyDynamicMetadata * metadata = QueryMaterialPropertyMetadata ( property Name ) ;
MaterialPropertyDynamicMetadata * metadata = QueryMaterialPropertyMetadata ( property Id ) ;
if ( ! metadata )
{
return false ;
@ -245,7 +245,7 @@ namespace AZ
if ( metadata - > m_propertyRange . m_min ! = min )
{
metadata - > m_propertyRange . m_min = min ;
m_updatedPropertiesOut . insert ( property Name ) ;
m_updatedPropertiesOut . insert ( property Id ) ;
}
return true ;
@ -257,9 +257,9 @@ namespace AZ
return SetMaterialPropertyMinValue ( name , min ) ;
}
bool MaterialFunctor : : EditorContext : : SetMaterialPropertyMaxValue ( const Name & property Name , const MaterialPropertyValue & max )
bool MaterialFunctor : : EditorContext : : SetMaterialPropertyMaxValue ( const Name & property Id , const MaterialPropertyValue & max )
{
MaterialPropertyDynamicMetadata * metadata = QueryMaterialPropertyMetadata ( property Name ) ;
MaterialPropertyDynamicMetadata * metadata = QueryMaterialPropertyMetadata ( property Id ) ;
if ( ! metadata )
{
return false ;
@ -268,7 +268,7 @@ namespace AZ
if ( metadata - > m_propertyRange . m_max ! = max )
{
metadata - > m_propertyRange . m_max = max ;
m_updatedPropertiesOut . insert ( property Name ) ;
m_updatedPropertiesOut . insert ( property Id ) ;
}
return true ;
@ -280,9 +280,9 @@ namespace AZ
return SetMaterialPropertyMaxValue ( name , max ) ;
}
bool MaterialFunctor : : EditorContext : : SetMaterialPropertySoftMinValue ( const Name & property Name , const MaterialPropertyValue & min )
bool MaterialFunctor : : EditorContext : : SetMaterialPropertySoftMinValue ( const Name & property Id , const MaterialPropertyValue & min )
{
MaterialPropertyDynamicMetadata * metadata = QueryMaterialPropertyMetadata ( property Name ) ;
MaterialPropertyDynamicMetadata * metadata = QueryMaterialPropertyMetadata ( property Id ) ;
if ( ! metadata )
{
return false ;
@ -291,7 +291,7 @@ namespace AZ
if ( metadata - > m_propertyRange . m_softMin ! = min )
{
metadata - > m_propertyRange . m_softMin = min ;
m_updatedPropertiesOut . insert ( property Name ) ;
m_updatedPropertiesOut . insert ( property Id ) ;
}
return true ;
@ -303,9 +303,9 @@ namespace AZ
return SetMaterialPropertySoftMinValue ( name , min ) ;
}
bool MaterialFunctor : : EditorContext : : SetMaterialPropertySoftMaxValue ( const Name & property Name , const MaterialPropertyValue & max )
bool MaterialFunctor : : EditorContext : : SetMaterialPropertySoftMaxValue ( const Name & property Id , const MaterialPropertyValue & max )
{
MaterialPropertyDynamicMetadata * metadata = QueryMaterialPropertyMetadata ( property Name ) ;
MaterialPropertyDynamicMetadata * metadata = QueryMaterialPropertyMetadata ( property Id ) ;
if ( ! metadata )
{
return false ;
@ -314,7 +314,7 @@ namespace AZ
if ( metadata - > m_propertyRange . m_softMax ! = max )
{
metadata - > m_propertyRange . m_softMax = max ;
m_updatedPropertiesOut . insert ( property Name ) ;
m_updatedPropertiesOut . insert ( property Id ) ;
}
return true ;
@ -326,24 +326,24 @@ namespace AZ
return SetMaterialPropertySoftMaxValue ( name , max ) ;
}
MaterialPropertyDynamicMetadata * MaterialFunctor : : EditorContext : : QueryMaterialPropertyMetadata ( const Name & property Name ) const
MaterialPropertyDynamicMetadata * MaterialFunctor : : EditorContext : : QueryMaterialPropertyMetadata ( const Name & property Id ) const
{
auto it = m_propertyMetadata . find ( property Name ) ;
auto it = m_propertyMetadata . find ( property Id ) ;
if ( it = = m_propertyMetadata . end ( ) )
{
AZ_Error ( " MaterialFunctor " , false , " Couldn't find metadata for material property: %s. " , property Name . GetCStr ( ) ) ;
AZ_Error ( " MaterialFunctor " , false , " Couldn't find metadata for material property: %s. " , property Id . GetCStr ( ) ) ;
return nullptr ;
}
return & it - > second ;
}
MaterialPropertyGroupDynamicMetadata * MaterialFunctor : : EditorContext : : QueryMaterialPropertyGroupMetadata ( const Name & propertyGroup Name ) const
MaterialPropertyGroupDynamicMetadata * MaterialFunctor : : EditorContext : : QueryMaterialPropertyGroupMetadata ( const Name & propertyGroup Id ) const
{
auto it = m_propertyGroupMetadata . find ( propertyGroup Name ) ;
auto it = m_propertyGroupMetadata . find ( propertyGroup Id ) ;
if ( it = = m_propertyGroupMetadata . end ( ) )
{
AZ_Error ( " MaterialFunctor " , false , " Couldn't find metadata for material property group: %s. " , propertyGroup Name . GetCStr ( ) ) ;
AZ_Error ( " MaterialFunctor " , false , " Couldn't find metadata for material property group: %s. " , propertyGroup Id . GetCStr ( ) ) ;
return nullptr ;
}
@ -357,20 +357,20 @@ namespace AZ
}
// explicit template instantiation
template const bool & MaterialFunctor : : RuntimeContext : : GetMaterialPropertyValue < bool > ( const Name & property Name ) const ;
template const int32_t & MaterialFunctor : : RuntimeContext : : GetMaterialPropertyValue < int32_t > ( const Name & property Name ) const ;
template const uint32_t & MaterialFunctor : : RuntimeContext : : GetMaterialPropertyValue < uint32_t > ( const Name & property Name ) const ;
template const float & MaterialFunctor : : RuntimeContext : : GetMaterialPropertyValue < float > ( const Name & property Name ) const ;
template const Vector2 & MaterialFunctor : : RuntimeContext : : GetMaterialPropertyValue < Vector2 > ( const Name & property Name ) const ;
template const Vector3 & MaterialFunctor : : RuntimeContext : : GetMaterialPropertyValue < Vector3 > ( const Name & property Name ) const ;
template const Vector4 & MaterialFunctor : : RuntimeContext : : GetMaterialPropertyValue < Vector4 > ( const Name & property Name ) const ;
template const Color & MaterialFunctor : : RuntimeContext : : GetMaterialPropertyValue < Color > ( const Name & property Name ) const ;
template const Data : : Instance < Image > & MaterialFunctor : : RuntimeContext : : GetMaterialPropertyValue < Data : : Instance < Image > > ( const Name & property Name ) const ;
template const bool & MaterialFunctor : : RuntimeContext : : GetMaterialPropertyValue < bool > ( const Name & property Id ) const ;
template const int32_t & MaterialFunctor : : RuntimeContext : : GetMaterialPropertyValue < int32_t > ( const Name & property Id ) const ;
template const uint32_t & MaterialFunctor : : RuntimeContext : : GetMaterialPropertyValue < uint32_t > ( const Name & property Id ) const ;
template const float & MaterialFunctor : : RuntimeContext : : GetMaterialPropertyValue < float > ( const Name & property Id ) const ;
template const Vector2 & MaterialFunctor : : RuntimeContext : : GetMaterialPropertyValue < Vector2 > ( const Name & property Id ) const ;
template const Vector3 & MaterialFunctor : : RuntimeContext : : GetMaterialPropertyValue < Vector3 > ( const Name & property Id ) const ;
template const Vector4 & MaterialFunctor : : RuntimeContext : : GetMaterialPropertyValue < Vector4 > ( const Name & property Id ) const ;
template const Color & MaterialFunctor : : RuntimeContext : : GetMaterialPropertyValue < Color > ( const Name & property Id ) const ;
template const Data : : Instance < Image > & MaterialFunctor : : RuntimeContext : : GetMaterialPropertyValue < Data : : Instance < Image > > ( const Name & property Id ) const ;
template < typename Type >
const Type & MaterialFunctor : : RuntimeContext : : GetMaterialPropertyValue ( const Name & property Name ) const
const Type & MaterialFunctor : : RuntimeContext : : GetMaterialPropertyValue ( const Name & property Id ) const
{
return GetMaterialPropertyValue ( property Name ) . GetValue < Type > ( ) ;
return GetMaterialPropertyValue ( property Id ) . GetValue < Type > ( ) ;
}
// explicit template instantiation
@ -391,19 +391,19 @@ namespace AZ
}
// explicit template instantiation
template const bool & MaterialFunctor : : EditorContext : : GetMaterialPropertyValue < bool > ( const Name & property Name ) const ;
template const int32_t & MaterialFunctor : : EditorContext : : GetMaterialPropertyValue < int32_t > ( const Name & property Name ) const ;
template const uint32_t & MaterialFunctor : : EditorContext : : GetMaterialPropertyValue < uint32_t > ( const Name & property Name ) const ;
template const float & MaterialFunctor : : EditorContext : : GetMaterialPropertyValue < float > ( const Name & property Name ) const ;
template const Vector2 & MaterialFunctor : : EditorContext : : GetMaterialPropertyValue < Vector2 > ( const Name & property Name ) const ;
template const Vector3 & MaterialFunctor : : EditorContext : : GetMaterialPropertyValue < Vector3 > ( const Name & property Name ) const ;
template const Vector4 & MaterialFunctor : : EditorContext : : GetMaterialPropertyValue < Vector4 > ( const Name & property Name ) const ;
template const Color & MaterialFunctor : : EditorContext : : GetMaterialPropertyValue < Color > ( const Name & property Name ) const ;
template const bool & MaterialFunctor : : EditorContext : : GetMaterialPropertyValue < bool > ( const Name & property Id ) const ;
template const int32_t & MaterialFunctor : : EditorContext : : GetMaterialPropertyValue < int32_t > ( const Name & property Id ) const ;
template const uint32_t & MaterialFunctor : : EditorContext : : GetMaterialPropertyValue < uint32_t > ( const Name & property Id ) const ;
template const float & MaterialFunctor : : EditorContext : : GetMaterialPropertyValue < float > ( const Name & property Id ) const ;
template const Vector2 & MaterialFunctor : : EditorContext : : GetMaterialPropertyValue < Vector2 > ( const Name & property Id ) const ;
template const Vector3 & MaterialFunctor : : EditorContext : : GetMaterialPropertyValue < Vector3 > ( const Name & property Id ) const ;
template const Vector4 & MaterialFunctor : : EditorContext : : GetMaterialPropertyValue < Vector4 > ( const Name & property Id ) const ;
template const Color & MaterialFunctor : : EditorContext : : GetMaterialPropertyValue < Color > ( const Name & property Id ) const ;
template < typename Type >
const Type & MaterialFunctor : : EditorContext : : GetMaterialPropertyValue ( const Name & property Name ) const
const Type & MaterialFunctor : : EditorContext : : GetMaterialPropertyValue ( const Name & property Id ) const
{
return GetMaterialPropertyValue ( property Name ) . GetValue < Type > ( ) ;
return GetMaterialPropertyValue ( property Id ) . GetValue < Type > ( ) ;
}
// explicit template instantiation
@ -436,9 +436,9 @@ namespace AZ
return m_materialPropertyValues [ index . GetIndex ( ) ] ;
}
const MaterialPropertyValue & MaterialFunctor : : RuntimeContext : : GetMaterialPropertyValue ( const Name & property Name ) const
const MaterialPropertyValue & MaterialFunctor : : RuntimeContext : : GetMaterialPropertyValue ( const Name & property Id ) const
{
MaterialPropertyIndex index = m_materialPropertiesLayout - > FindPropertyIndex ( property Name ) ;
MaterialPropertyIndex index = m_materialPropertiesLayout - > FindPropertyIndex ( property Id ) ;
return GetMaterialPropertyValue ( index ) ;
}
@ -449,9 +449,9 @@ namespace AZ
return m_materialPropertyValues [ index . GetIndex ( ) ] ;
}
const MaterialPropertyValue & MaterialFunctor : : EditorContext : : GetMaterialPropertyValue ( const Name & property Name ) const
const MaterialPropertyValue & MaterialFunctor : : EditorContext : : GetMaterialPropertyValue ( const Name & property Id ) const
{
MaterialPropertyIndex index = m_materialPropertiesLayout - > FindPropertyIndex ( property Name ) ;
MaterialPropertyIndex index = m_materialPropertiesLayout - > FindPropertyIndex ( property Id ) ;
return GetMaterialPropertyValue ( index ) ;
}