ActorEditorBus.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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/EBus/EBus.h>
  10. #include <EMotionFX/Source/Actor.h>
  11. #include <EMotionFX/Source/ActorInstance.h>
  12. namespace EMotionFX
  13. {
  14. /**
  15. * EMotion FX Actor Editor Request Bus
  16. * Used for making requests to actor editor.
  17. */
  18. class ActorEditorRequests
  19. : public AZ::EBusTraits
  20. {
  21. public:
  22. /**
  23. * Get the actor that is currently selected in the editor.
  24. * @result The currently selected actor.
  25. */
  26. virtual Actor* GetSelectedActor() { return nullptr; }
  27. /**
  28. * Get the actor instance that is currently selected in the editor.
  29. * @result The currently selected actor instance.
  30. */
  31. virtual ActorInstance* GetSelectedActorInstance() { return nullptr; }
  32. };
  33. using ActorEditorRequestBus = AZ::EBus<ActorEditorRequests>;
  34. /**
  35. * EMotion FX Actor Notification Bus
  36. * Used for monitoring events from the actor editor.
  37. */
  38. class ActorEditorNotifications
  39. : public AZ::EBusTraits
  40. {
  41. public:
  42. virtual void ActorSelectionChanged([[maybe_unused]] Actor* actor) {}
  43. virtual void ActorInstanceSelectionChanged([[maybe_unused]] ActorInstance* actorInstance) {}
  44. };
  45. using ActorEditorNotificationBus = AZ::EBus<ActorEditorNotifications>;
  46. } // namespace EMotionFX