EditorGradientTransformComponent.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #pragma once
  9. #include <GradientSignal/Components/GradientTransformComponent.h>
  10. #include <LmbrCentral/Component/EditorWrappedComponentBase.h>
  11. namespace GradientSignal
  12. {
  13. class EditorGradientTransformComponent
  14. : public LmbrCentral::EditorWrappedComponentBase<GradientTransformComponent, GradientTransformConfig>
  15. , private LmbrCentral::DependencyNotificationBus::Handler
  16. {
  17. public:
  18. using BaseClassType = LmbrCentral::EditorWrappedComponentBase<GradientTransformComponent, GradientTransformConfig>;
  19. AZ_EDITOR_COMPONENT(EditorGradientTransformComponent, "{33B2AEB0-DD12-44E8-AAF0-5B227D3703FF}", BaseClassType);
  20. static void Reflect(AZ::ReflectContext* context);
  21. // AZ::Component interface
  22. void Activate() override;
  23. void Deactivate() override;
  24. //////////////////////////////////////////////////////////////////////////
  25. // DependencyNotificationBus
  26. void OnCompositionChanged() override;
  27. static constexpr const char* const s_categoryName = "Gradient Modifiers";
  28. static constexpr const char* const s_componentName = "Gradient Transform Modifier";
  29. static constexpr const char* const s_componentDescription = "Transforms coordinates into a space relative to a shape, allowing other transform and sampling modifications";
  30. static constexpr const char* const s_icon = "Editor/Icons/Components/GradientModifier.svg";
  31. static constexpr const char* const s_viewportIcon = "Editor/Icons/Components/Viewport/GradientModifier.svg";
  32. static constexpr const char* const s_helpUrl = "https://o3de.org/docs/user-guide/components/reference/gradient-modifiers/gradient-transform-modifier/";
  33. private:
  34. AZ::u32 ConfigurationChanged() override;
  35. void UpdateFromShape();
  36. };
  37. } //namespace GradientSignal