Changing material component property inspector to dockable view pane

• Inspector is locked to a specific entity and material assignment ID
• All modifications are made via the material component request bus
• Removed complicated configuration management in editor material component
• Multiple material property inspectors can be opened
• Multiple materials across different entities can be edited simultaneously
• No longer blocks the viewport or other interactions
• Added functions to material component request bus for retrieving material slot labels, default materials, getting and setting property and UV overrides
• Added more asset related types to material property value conversion from any
• Added support for static heading widget on top of atom tools inspector, currently used for menus and messages

WIP: Still investigating intermittent crash because of corrupt asset property
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
This commit is contained in:
Guthrie Adams
2021-09-14 19:11:11 -05:00
parent e69238d4de
commit f7d4b8e70f
19 changed files with 826 additions and 556 deletions
@@ -109,11 +109,20 @@ namespace AZ
{
result.m_value = AZStd::any_cast<Color>(value);
}
else if (value.is<Data::AssetId>())
{
result.m_value = Data::Asset<RPI::ImageAsset>(
AZStd::any_cast<Data::AssetId>(value), azrtti_typeid<RPI::StreamingImageAsset>());
}
else if (value.is<Data::Asset<Data::AssetData>>())
{
result.m_value = Data::Asset<RPI::ImageAsset>(
AZStd::any_cast<Data::Asset<Data::AssetData>>(value).GetId(), azrtti_typeid<RPI::StreamingImageAsset>());
}
else if (value.is<Data::Asset<StreamingImageAsset>>())
{
result.m_value = Data::Asset<RPI::ImageAsset>(
AZStd::any_cast<Data::Asset<StreamingImageAsset>>(value).GetId(),
azrtti_typeid<RPI::StreamingImageAsset>());
AZStd::any_cast<Data::Asset<StreamingImageAsset>>(value).GetId(), azrtti_typeid<RPI::StreamingImageAsset>());
}
else if (value.is<Data::Asset<ImageAsset>>())
{
@@ -129,7 +138,8 @@ namespace AZ
}
else
{
AZ_Warning("MaterialPropertyValue", false, "Cannot convert any to variant. Type in any is: %s.",
AZ_Warning(
"MaterialPropertyValue", false, "Cannot convert any to variant. Type in any is: %s.",
value.get_type_info().m_id.ToString<AZStd::string>().data());
}
@@ -187,5 +197,5 @@ namespace AZ
return result;
}
}
}
} // namespace RPI
} // namespace AZ