ExportingComponent.cpp 1.4 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. #include <AzCore/Serialization/SerializeContext.h>
  9. #include <SceneAPI/SceneCore/Components/ExportingComponent.h>
  10. #include <SceneAPI/SceneCore/Events/ExportProductList.h>
  11. #include <AzCore/RTTI/BehaviorContext.h>
  12. namespace AZ
  13. {
  14. namespace SceneAPI
  15. {
  16. namespace SceneCore
  17. {
  18. void ExportingComponent::Activate()
  19. {
  20. ActivateBindings();
  21. }
  22. void ExportingComponent::Deactivate()
  23. {
  24. DeactivateBindings();
  25. }
  26. void ExportingComponent::Reflect(ReflectContext* context)
  27. {
  28. SerializeContext* serializeContext = azrtti_cast<SerializeContext*>(context);
  29. if (serializeContext)
  30. {
  31. serializeContext->Class<ExportingComponent, AZ::Component>()->Version(2);
  32. }
  33. AZ::BehaviorContext* behaviorContext = azrtti_cast<AZ::BehaviorContext*>(context);
  34. if (behaviorContext)
  35. {
  36. Events::ExportProductList::Reflect(behaviorContext);
  37. }
  38. }
  39. } // namespace SceneCore
  40. } // namespace SceneAPI
  41. } // namespace AZ