EditorEntityAPI.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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/Outcome/Outcome.h>
  10. #include <AzCore/RTTI/TypeInfoSimple.h>
  11. #include <AzCore/RTTI/RTTIMacros.h>
  12. #include <AzCore/std/string/string.h>
  13. #include <AzToolsFramework/Entity/EntityTypes.h>
  14. namespace AzToolsFramework
  15. {
  16. /*!
  17. * EditorEntityAPI
  18. * Handles basic Entity operations
  19. */
  20. class EditorEntityAPI
  21. {
  22. public:
  23. AZ_RTTI(EditorEntityAPI, "{3E217E21-046F-462E-8FA2-1347FBDDFDE7}");
  24. /**
  25. * Delete all currently-selected entities.
  26. */
  27. virtual void DeleteSelected() = 0;
  28. /**
  29. * Deletes the specified entity.
  30. */
  31. virtual void DeleteEntityById(AZ::EntityId entityId) = 0;
  32. /**
  33. * Deletes all specified entities.
  34. */
  35. virtual void DeleteEntities(const EntityIdList& entities) = 0;
  36. /**
  37. * Deletes the specified entity, as well as any transform descendants.
  38. */
  39. virtual void DeleteEntityAndAllDescendants(AZ::EntityId entityId) = 0;
  40. /**
  41. * Deletes all entities in the provided list, as well as their transform descendants.
  42. */
  43. virtual void DeleteEntitiesAndAllDescendants(const EntityIdList& entities) = 0;
  44. /**
  45. * Duplicate all currently-selected entities.
  46. */
  47. virtual void DuplicateSelected() = 0;
  48. /**
  49. * Duplicates the specified entity.
  50. */
  51. virtual void DuplicateEntityById(AZ::EntityId entityId) = 0;
  52. /**
  53. * Duplicates all specified entities.
  54. */
  55. virtual void DuplicateEntities(const EntityIdList& entities) = 0;
  56. };
  57. } // namespace AzToolsFramework