/* * Copyright (c) Contributors to the Open 3D Engine Project. * For complete copyright and license terms please see the LICENSE at the root of this distribution. * * SPDX-License-Identifier: Apache-2.0 OR MIT * */ #include #include #include #include namespace Terrain { void EditorTerrainMacroMaterialComponent::Reflect(AZ::ReflectContext* context) { BaseClassType::ReflectSubClass( context, 1, &LmbrCentral::EditorWrappedComponentBaseVersionConverter ); AZ::SerializeContext* serializeContext = azrtti_cast(context); if (serializeContext) { AZ::EditContext* editContext = serializeContext->GetEditContext(); // The edit context for TerrainMacroMaterialConfig is specified here to make it easier to add custom filtering to the // asset picker for the material asset so that we can eventually only display materials that inherit from the proper // material type. if (editContext) { editContext ->Class( "Terrain Macro Material Component", "Provide a terrain macro material for a region of the world") ->ClassElement(AZ::Edit::ClassElements::EditorData, "") ->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly) ->Attribute(AZ::Edit::Attributes::AutoExpand, true) ->DataElement( AZ::Edit::UIHandlers::Default, &TerrainMacroMaterialConfig::m_materialAsset, "Macro Material", "Terrain macro material for use by any terrain inside the bounding box on this entity.") // This is disabled until ChangeValidate can support the Asset type. :( //->Attribute(AZ::Edit::Attributes::ChangeValidate, &TerrainMacroMaterialConfig::ValidateMaterialAsset) ; } } } }