SkeletonGroup.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 <SceneAPI/SceneCore/Components/BehaviorComponent.h>
  10. #include <SceneAPI/SceneCore/Events/ManifestMetaInfoBus.h>
  11. #include <SceneAPI/SceneCore/Events/AssetImportRequest.h>
  12. namespace AZ
  13. {
  14. namespace SceneAPI
  15. {
  16. namespace Behaviors
  17. {
  18. class SkeletonGroup
  19. : public SceneCore::BehaviorComponent
  20. , public Events::ManifestMetaInfoBus::Handler
  21. , public Events::AssetImportRequestBus::Handler
  22. {
  23. public:
  24. AZ_COMPONENT(SkeletonGroup, "{9243A4BA-46BD-4961-950F-DEFAE9A919E5}", SceneCore::BehaviorComponent);
  25. ~SkeletonGroup() override = default;
  26. void Activate() override;
  27. void Deactivate() override;
  28. static void Reflect(ReflectContext* context);
  29. void GetCategoryAssignments(CategoryRegistrationList& categories, const Containers::Scene& scene) override;
  30. void InitializeObject(const Containers::Scene& scene, DataTypes::IManifestObject& target) override;
  31. Events::ProcessingResult UpdateManifest(Containers::Scene& scene, ManifestAction action,
  32. RequestingApplication requester) override;
  33. void GetPolicyName(AZStd::string& result) const override
  34. {
  35. result = "SkeletonGroup";
  36. }
  37. private:
  38. Events::ProcessingResult BuildDefault(Containers::Scene& scene);
  39. Events::ProcessingResult UpdateSkeletonGroups(Containers::Scene& scene) const;
  40. bool SceneHasSkeletonGroup(const Containers::Scene& scene) const;
  41. static constexpr int s_rigsPreferredTabOrder{ 1 };
  42. bool m_isDefaultConstructing{ false };
  43. };
  44. } // namespace Behaviors
  45. } // namespace SceneAPI
  46. } // namespace AZ