Add material property names to material assets, disable FBX dependency on materialtype files. (#3408)
* Add material property names to material assets, disable FBX dependency on materialtype files. Signed-off-by: Robin <rbarrand@amazon.com> * Add reflection for MaterialAssets. Update member variable comment. Signed-off-by: Robin <rbarrand@amazon.com> * Switch cvar to using bus value. Refine comments. Signed-off-by: Robin <rbarrand@amazon.com> * Refactor functions and refine comments. Signed-off-by: Robin <rbarrand@amazon.com> * Realign property values when material property names are populated. Signed-off-by: Robin <rbarrand@amazon.com> * Switch PostLoadInit check to on asset status ready. Add realign property values code to PostLoadInit as well. Signed-off-by: Robin <rbarrand@amazon.com> * Stash@{1} code. Signed-off-by: Robin <rbarrand@amazon.com> * Refactor realignment code into the right places. Signed-off-by: Robin <rbarrand@amazon.com> * Remove pragma optmize off. Signed-off-by: Robin <rbarrand@amazon.com> * More refactoring. Signed-off-by: Robin <rbarrand@amazon.com> * Refactor comments and remove code no longer needed. Signed-off-by: Robin <rbarrand@amazon.com> * Refactor comments and remove unused include. Signed-off-by: Robin <rbarrand@amazon.com> * Comment refactor, corrected some code. Signed-off-by: Robin <rbarrand@amazon.com> Co-authored-by: Robin <rbarrand@amazon.com>
This commit is contained in:
@@ -26,9 +26,10 @@ namespace AZ
|
||||
if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
|
||||
{
|
||||
serializeContext->Class<MaterialConverterSettings>()
|
||||
->Version(1)
|
||||
->Version(2)
|
||||
->Field("Enable", &MaterialConverterSettings::m_enable)
|
||||
->Field("DefaultMaterial", &MaterialConverterSettings::m_defaultMaterial);
|
||||
->Field("DefaultMaterial", &MaterialConverterSettings::m_defaultMaterial)
|
||||
->Field("IncludeMaterialPropertyNames", &MaterialConverterSettings::m_includeMaterialPropertyNames);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,6 +70,11 @@ namespace AZ
|
||||
return m_settings.m_enable;
|
||||
}
|
||||
|
||||
bool MaterialConverterSystemComponent::ShouldIncludeMaterialPropertyNames() const
|
||||
{
|
||||
return m_settings.m_includeMaterialPropertyNames;
|
||||
}
|
||||
|
||||
bool MaterialConverterSystemComponent::ConvertMaterial(
|
||||
const AZ::SceneAPI::DataTypes::IMaterialData& materialData, RPI::MaterialSourceData& sourceData)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user