/* * All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or * its licensors. * * For complete copyright and license terms please see the LICENSE at the root of this * distribution (the "License"). All use of this software is governed by the License, * or, if provided, by the license below or the license accompanying this file. Do not * remove or modify any license notices. This file is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * */ #include "GradientSignal_precompiled.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace GradientSignal { GradientSignalEditorModule::GradientSignalEditorModule() { m_descriptors.insert(m_descriptors.end(), { GradientSignalEditorSystemComponent::CreateDescriptor(), EditorImageProcessingSystemComponent::CreateDescriptor(), EditorSurfaceAltitudeGradientComponent::CreateDescriptor(), EditorSmoothStepGradientComponent::CreateDescriptor(), EditorSurfaceSlopeGradientComponent::CreateDescriptor(), EditorMixedGradientComponent::CreateDescriptor(), EditorImageBuilderPluginComponent::CreateDescriptor(), EditorImageGradientComponent::CreateDescriptor(), EditorConstantGradientComponent::CreateDescriptor(), EditorThresholdGradientComponent::CreateDescriptor(), EditorLevelsGradientComponent::CreateDescriptor(), EditorReferenceGradientComponent::CreateDescriptor(), EditorInvertGradientComponent::CreateDescriptor(), EditorDitherGradientComponent::CreateDescriptor(), EditorPosterizeGradientComponent::CreateDescriptor(), EditorShapeAreaFalloffGradientComponent::CreateDescriptor(), EditorPerlinGradientComponent::CreateDescriptor(), EditorRandomGradientComponent::CreateDescriptor(), EditorGradientTransformComponent::CreateDescriptor(), EditorSurfaceMaskGradientComponent::CreateDescriptor(), EditorGradientSurfaceDataComponent::CreateDescriptor(), }); } AZ::ComponentTypeList GradientSignalEditorModule::GetRequiredSystemComponents() const { AZ::ComponentTypeList requiredComponents = GradientSignalModule::GetRequiredSystemComponents(); requiredComponents.push_back(azrtti_typeid()); requiredComponents.push_back(azrtti_typeid()); return requiredComponents; } void GradientSignalEditorSystemComponent::Reflect(AZ::ReflectContext* context) { if (auto serializeContext = azrtti_cast(context)) { serializeContext->Class() ->Version(0) ; if (auto editContext = serializeContext->GetEditContext()) { editContext->Class("GradientSignalEditorSystemComponent", "Handles registration of the gradient preview data widget handler") ->ClassElement(AZ::Edit::ClassElements::EditorData, "") ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("System", 0xc94d118b)) ->Attribute(AZ::Edit::Attributes::AutoExpand, true) ; } } } void GradientSignalEditorSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) { provided.push_back(AZ_CRC("GradientSignalEditorService", 0xb7e6d6c7)); } void GradientSignalEditorSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible) { incompatible.push_back(AZ_CRC("GradientSignalEditorService", 0xb7e6d6c7)); } void GradientSignalEditorSystemComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required) { required.push_back(AZ_CRC("PropertyManagerService", 0x63a3d7ad)); } void GradientSignalEditorSystemComponent::GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& /*dependent*/) { } void GradientSignalEditorSystemComponent::Activate() { GradientPreviewDataWidgetHandler::Register(); } void GradientSignalEditorSystemComponent::Deactivate() { GradientPreviewDataWidgetHandler::Unregister(); } } AZ_DECLARE_MODULE_CLASS(GradientSignalEditor, GradientSignal::GradientSignalEditorModule)