NamedPoseManagerEditor.cpp 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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 "NamedPoseManagerEditor.h"
  9. #include <AzCore/Serialization/SerializeContext.h>
  10. #include <Clients/NamedPosesManager.h>
  11. #include <SimulationInterfaces/SimulationInterfacesTypeIds.h>
  12. namespace SimulationInterfaces
  13. {
  14. AZ_COMPONENT_IMPL(NamedPoseManagerEditor, "NamedPoseManagerEditor", NamedPoseManagerEditorTypeId, BaseSystemComponent);
  15. void NamedPoseManagerEditor::Reflect(AZ::ReflectContext* context)
  16. {
  17. if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
  18. {
  19. serializeContext->Class<NamedPoseManagerEditor, NamedPoseManager>()->Version(0);
  20. }
  21. }
  22. NamedPoseManagerEditor::NamedPoseManagerEditor() = default;
  23. NamedPoseManagerEditor::~NamedPoseManagerEditor() = default;
  24. void NamedPoseManagerEditor::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
  25. {
  26. BaseSystemComponent::GetProvidedServices(provided);
  27. provided.push_back(AZ_CRC_CE("NamedPoseManagerEditorService"));
  28. }
  29. void NamedPoseManagerEditor::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
  30. {
  31. BaseSystemComponent::GetIncompatibleServices(incompatible);
  32. incompatible.push_back(AZ_CRC_CE("NamedPoseManagerEditorService"));
  33. }
  34. void NamedPoseManagerEditor::GetRequiredServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& required)
  35. {
  36. BaseSystemComponent::GetRequiredServices(required);
  37. required.push_back(AZ_CRC_CE("SimulationFeaturesAggregatorEditorService"));
  38. }
  39. void NamedPoseManagerEditor::GetDependentServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& dependent)
  40. {
  41. BaseSystemComponent::GetDependentServices(dependent);
  42. dependent.push_back(AZ_CRC_CE("SimulationFeaturesAggregatorEditorService"));
  43. }
  44. void NamedPoseManagerEditor::Activate()
  45. {
  46. BaseSystemComponent::Activate();
  47. AzToolsFramework::EditorEvents::Bus::Handler::BusConnect();
  48. }
  49. void NamedPoseManagerEditor::Deactivate()
  50. {
  51. AzToolsFramework::EditorEvents::Bus::Handler::BusDisconnect();
  52. BaseSystemComponent::Deactivate();
  53. }
  54. } // namespace SimulationInterfaces