EditorSequenceComponentBus.h 2.2 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 <AzCore/Component/ComponentBus.h>
  10. #include <AzCore/std/string/string.h>
  11. #include <IMovieSystem.h>
  12. #include "SequenceComponentBus.h"
  13. enum class AnimValueType;
  14. namespace Maestro
  15. {
  16. /*!
  17. * EditorSequenceComponentRequests EBus Interface
  18. * Messages serviced by DirectorComponents.
  19. */
  20. class EditorSequenceComponentRequests
  21. : public AZ::ComponentBus
  22. {
  23. public:
  24. //////////////////////////////////////////////////////////////////////////
  25. // EBusTraits overrides - application is a singleton
  26. static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; // Only one component on a entity can implement the events
  27. //////////////////////////////////////////////////////////////////////////
  28. //! Adds an entity to be animated
  29. virtual void AddEntityToAnimate(AZ::EntityId entityToAnimate) = 0;
  30. //! Remove EntityToAnimate
  31. virtual void RemoveEntityToAnimate(AZ::EntityId removedEntityId) = 0;
  32. //! Marks the entity as dirty in the Editor. Returns true if the entity was marked as dirty, false otherwise.
  33. virtual bool MarkEntityAsDirty() const = 0;
  34. //! Fills in a list of all animatable properites for a given component on a given entity.
  35. virtual void GetAllAnimatablePropertiesForComponent(IAnimNode::AnimParamInfos& addressList, AZ::EntityId id, AZ::ComponentId componentId) = 0;
  36. //! Fills in a list of all animatable component ids for the given entity.
  37. virtual void GetAnimatableComponents(AZStd::vector<AZ::ComponentId>& componentIds, AZ::EntityId id) = 0;
  38. //! Return the AnimValueType type for the given address
  39. virtual AnimValueType GetValueType(const AZStd::string& animatableAddress) = 0;
  40. };
  41. using EditorSequenceComponentRequestBus = AZ::EBus<EditorSequenceComponentRequests>;
  42. // defined in the bus header so we can refer to it in the Editor code
  43. #define EditorSequenceComponentTypeId "{C02DC0E2-D0F3-488B-B9EE-98E28077EC56}"
  44. } // namespace Maestro