LYN-7376 test_TerrainHeightGradientList_AddRemoveGradients
Signed-off-by: sphrose <82213493+sphrose@users.noreply.github.com>
This commit is contained in:
@@ -48,6 +48,15 @@ namespace Terrain
|
||||
->Attribute(AZ::Edit::Attributes::RequiredService, AZ_CRC_CE("GradientService"))
|
||||
;
|
||||
}
|
||||
|
||||
if (auto behaviorContext = azrtti_cast<AZ::BehaviorContext*>(context))
|
||||
{
|
||||
behaviorContext->Class<TerrainHeightGradientListConfig>()
|
||||
->Attribute(AZ::Script::Attributes::Category, "Terrain")
|
||||
->Constructor()
|
||||
->Property("gradientEntities", BehaviorValueProperty(&TerrainHeightGradientListConfig::m_gradientEntities))
|
||||
;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ namespace Terrain
|
||||
AZStd::vector<AZ::EntityId> m_gradientEntities;
|
||||
};
|
||||
|
||||
static const AZ::Uuid TerrainHeightGradientListComponentTypeId = "{1BB3BA6C-6D4A-4636-B542-F23ECBA8F2AB}";
|
||||
|
||||
class TerrainHeightGradientListComponent
|
||||
: public AZ::Component
|
||||
@@ -54,7 +55,7 @@ namespace Terrain
|
||||
public:
|
||||
template<typename, typename>
|
||||
friend class LmbrCentral::EditorWrappedComponentBase;
|
||||
AZ_COMPONENT(TerrainHeightGradientListComponent, "{1BB3BA6C-6D4A-4636-B542-F23ECBA8F2AB}");
|
||||
AZ_COMPONENT(TerrainHeightGradientListComponent, TerrainHeightGradientListComponentTypeId);
|
||||
static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& services);
|
||||
static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& services);
|
||||
static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& services);
|
||||
@@ -64,6 +65,8 @@ namespace Terrain
|
||||
TerrainHeightGradientListComponent() = default;
|
||||
~TerrainHeightGradientListComponent() = default;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// TerrainAreaHeightRequestBus
|
||||
void GetHeight(const AZ::Vector3& inPosition, AZ::Vector3& outPosition, bool& terrainExists) override;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -54,6 +54,17 @@ namespace Terrain
|
||||
->DataElement(AZ::Edit::UIHandlers::Default, &TerrainLayerSpawnerConfig::m_useGroundPlane, "Use Ground Plane", "Determines whether or not to provide a default ground plane")
|
||||
;
|
||||
}
|
||||
|
||||
if (auto behaviorContext = azrtti_cast<AZ::BehaviorContext*>(context))
|
||||
{
|
||||
behaviorContext->Class<TerrainLayerSpawnerConfig>()
|
||||
->Attribute(AZ::Script::Attributes::Category, "Terrain")
|
||||
->Constructor()
|
||||
->Property("layer", BehaviorValueProperty(&TerrainLayerSpawnerConfig::m_layer))
|
||||
->Property("priority", BehaviorValueProperty(&TerrainLayerSpawnerConfig::m_priority))
|
||||
->Property("useGroundPlane", BehaviorValueProperty(&TerrainLayerSpawnerConfig::m_useGroundPlane))
|
||||
->Method("GetSelectableLayers", &TerrainLayerSpawnerConfig::GetSelectableLayers);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ namespace Terrain
|
||||
bool m_useGroundPlane = true;
|
||||
};
|
||||
|
||||
static const AZ::Uuid TerrainLayerSpawnerComponentTypeId = "{3848605F-A4EA-478C-B710-84AB8DCA9EC5}";
|
||||
|
||||
class TerrainLayerSpawnerComponent
|
||||
: public AZ::Component
|
||||
@@ -61,7 +62,7 @@ namespace Terrain
|
||||
public:
|
||||
template<typename, typename>
|
||||
friend class LmbrCentral::EditorWrappedComponentBase;
|
||||
AZ_COMPONENT(TerrainLayerSpawnerComponent, "{3848605F-A4EA-478C-B710-84AB8DCA9EC5}");
|
||||
AZ_COMPONENT(TerrainLayerSpawnerComponent, TerrainLayerSpawnerComponentTypeId);
|
||||
static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& services);
|
||||
static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& services);
|
||||
static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& services);
|
||||
|
||||
Reference in New Issue
Block a user