Fixed enum value problems
Signed-off-by: Kyle B <kylebirnbaum@gmail.com>
This commit is contained in:
@@ -80,7 +80,9 @@ namespace AZ
|
||||
"Renders IBL specular reflections in the forward pass, using only the most influential probe (based on the position of the entity) and the global IBL cubemap. Can reduce rendering costs, but only recommended for static objects that are affected by at most one reflection probe.")
|
||||
->Attribute(AZ::Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
|
||||
->DataElement(AZ::Edit::UIHandlers::ComboBox, &MeshComponentConfig::m_lodType, "Lod Type", "Lod Method.")
|
||||
->Attribute(AZ::Edit::Attributes::EnumValues, &MeshComponentConfig::GetLodTypeValues)
|
||||
->EnumAttribute(RPI::Cullable::LodType::Default, "Default")
|
||||
->EnumAttribute(RPI::Cullable::LodType::ScreenCoverage, "Screen Coverage")
|
||||
->EnumAttribute(RPI::Cullable::LodType::SpecificLod, "Specific Lod")
|
||||
->Attribute(AZ::Edit::Attributes::Visibility, &MeshComponentConfig::IsAssetSet)
|
||||
->ClassElement(AZ::Edit::ClassElements::Group, "Lod Configuration")
|
||||
->Attribute(AZ::Edit::Attributes::AutoExpand, false)
|
||||
|
||||
@@ -54,8 +54,7 @@ namespace AZ
|
||||
if (auto* serializeContext = azrtti_cast<SerializeContext*>(context))
|
||||
{
|
||||
serializeContext->Class<MeshComponentConfig>()
|
||||
//->Version(2, &MeshComponentControllerVersionUtility::VersionConverter)
|
||||
->Version(1)
|
||||
->Version(2, &MeshComponentControllerVersionUtility::VersionConverter)
|
||||
->Field("ModelAsset", &MeshComponentConfig::m_modelAsset)
|
||||
->Field("SortKey", &MeshComponentConfig::m_sortKey)
|
||||
->Field("ExcludeFromReflectionCubeMaps", &MeshComponentConfig::m_excludeFromReflectionCubeMaps)
|
||||
@@ -65,6 +64,7 @@ namespace AZ
|
||||
->Field("MinimumScreenCoverage", &MeshComponentConfig::m_minimumScreenCoverage)
|
||||
->Field("QualityDecayRate", &MeshComponentConfig::m_qualityDecayRate);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool MeshComponentConfig::IsAssetSet()
|
||||
@@ -120,15 +120,6 @@ namespace AZ
|
||||
return values;
|
||||
}
|
||||
|
||||
AZStd::vector<AZStd::pair<RPI::Cullable::LodType, AZStd::string>> MeshComponentConfig::GetLodTypeValues()
|
||||
{
|
||||
return {
|
||||
{aznumeric_cast<RPI::Cullable::LodType>(0), "Default"},
|
||||
{aznumeric_cast<RPI::Cullable::LodType>(1), "Screen Coverage" },
|
||||
{aznumeric_cast<RPI::Cullable::LodType>(2), "Specific Lod" }
|
||||
};
|
||||
}
|
||||
|
||||
MeshComponentController::~MeshComponentController()
|
||||
{
|
||||
// Release memory, disconnect from buses in the right order and broadcast events so that other components are aware.
|
||||
|
||||
@@ -48,7 +48,6 @@ namespace AZ
|
||||
bool LodTypeIsSpecificLOD();
|
||||
bool ShowLodConfig();
|
||||
AZStd::vector<AZStd::pair<RPI::Cullable::LodOverride, AZStd::string>> GetLodOverrideValues();
|
||||
AZStd::vector<AZStd::pair<RPI::Cullable::LodType, AZStd::string>> GetLodTypeValues();
|
||||
|
||||
Data::Asset<RPI::ModelAsset> m_modelAsset = { AZ::Data::AssetLoadBehavior::QueueLoad };
|
||||
RHI::DrawItemSortKey m_sortKey = 0;
|
||||
|
||||
Reference in New Issue
Block a user