ExposureControlComponent.cpp 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. #include <AzCore/RTTI/BehaviorContext.h>
  9. #include <PostProcess/ExposureControl/ExposureControlComponent.h>
  10. namespace AZ
  11. {
  12. namespace Render
  13. {
  14. ExposureControlComponent::ExposureControlComponent(const ExposureControlComponentConfig& config)
  15. : BaseClass(config)
  16. {
  17. }
  18. void ExposureControlComponent::Reflect(AZ::ReflectContext* context)
  19. {
  20. BaseClass::Reflect(context);
  21. if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
  22. {
  23. serializeContext->Class<ExposureControlComponent, BaseClass>();
  24. }
  25. if (auto behaviorContext = azrtti_cast<BehaviorContext*>(context))
  26. {
  27. behaviorContext->Class<ExposureControlComponent>()->RequestBus("ExposureControlRequestBus");
  28. behaviorContext->ConstantProperty("ExposureControlComponentTypeId", BehaviorConstant(Uuid(ExposureControlComponentTypeId)))
  29. ->Attribute(AZ::Script::Attributes::Module, "render")
  30. ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common);
  31. }
  32. }
  33. } // namespace Render
  34. } // namespace AZ