SceneEditor3DEvents.h 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. //
  2. // Copyright (c) 2014-2016 THUNDERBEAST GAMES LLC
  3. //
  4. // Permission is hereby granted, free of charge, to any person obtaining a copy
  5. // of this software and associated documentation files (the "Software"), to deal
  6. // in the Software without restriction, including without limitation the rights
  7. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  8. // copies of the Software, and to permit persons to whom the Software is
  9. // furnished to do so, subject to the following conditions:
  10. //
  11. // The above copyright notice and this permission notice shall be included in
  12. // all copies or substantial portions of the Software.
  13. //
  14. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  19. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  20. // THE SOFTWARE.
  21. //
  22. #pragma once
  23. #include <Atomic/Core/Object.h>
  24. namespace AtomicEditor
  25. {
  26. /// Variable timestep scene update.
  27. ATOMIC_EVENT(E_GIZMOEDITMODECHANGED, GizmoEditModeChanged)
  28. {
  29. ATOMIC_PARAM(P_MODE, Mode); // int
  30. }
  31. ATOMIC_EVENT(E_GIZMOAXISMODECHANGED, GizmoAxisModeChanged)
  32. {
  33. ATOMIC_PARAM(P_MODE, Mode); // int
  34. }
  35. ATOMIC_EVENT(E_GIZMOMOVED, GizmoMoved)
  36. {
  37. }
  38. ATOMIC_EVENT(E_SCENENODESELECTED, SceneNodeSelected)
  39. {
  40. ATOMIC_PARAM(P_SCENE, Scene); // Scene
  41. ATOMIC_PARAM(P_NODE, Node); // Node
  42. ATOMIC_PARAM(P_SELECTED, Selected); // bool
  43. ATOMIC_PARAM(P_QUIET, Quiet); // bool (don't record edit event)
  44. }
  45. ATOMIC_EVENT(E_SCENEEDITBEGIN, SceneEditBegin)
  46. {
  47. ATOMIC_PARAM(P_SCENE, Scene); // Scene
  48. }
  49. ATOMIC_EVENT(E_SCENEEDITNODEREPARENT, SceneEditNodeReparent)
  50. {
  51. ATOMIC_PARAM(P_NODE, Node); // Node
  52. ATOMIC_PARAM(P_ADDED, Added); // Boolean
  53. }
  54. ATOMIC_EVENT(E_SCENEEDITEND, SceneEditEnd)
  55. {
  56. ATOMIC_PARAM(P_SCENE, Scene); // Scene
  57. }
  58. ATOMIC_EVENT(E_SCENEEDITSTATECHANGESBEGIN, SceneEditStateChangesBegin)
  59. {
  60. }
  61. ATOMIC_EVENT(E_SCENEEDITSTATECHANGE, SceneEditStateChange)
  62. {
  63. ATOMIC_PARAM(P_SERIALIZABLE, Serializable); // Serializable
  64. }
  65. ATOMIC_EVENT(E_SCENEEDITSTATECHANGESEND, SceneEditStateChangesEnd)
  66. {
  67. }
  68. /// A child node has been added to a parent node.
  69. ATOMIC_EVENT(E_SCENEEDITNODECREATED, SceneEditNodeCreated)
  70. {
  71. ATOMIC_PARAM(P_NODE, Node); // Node pointer
  72. }
  73. /// A child node has been added to a parent node.
  74. ATOMIC_EVENT(E_SCENEEDITNODEADDED, SceneEditNodeAdded)
  75. {
  76. ATOMIC_PARAM(P_SCENE, Scene); // Scene pointer
  77. ATOMIC_PARAM(P_PARENT, Parent); // Node pointer
  78. ATOMIC_PARAM(P_NODE, Node); // Node pointer
  79. }
  80. /// A child node is about to be removed from a parent node.
  81. ATOMIC_EVENT(E_SCENEEDITNODEREMOVED, SceneEditNodeRemoved)
  82. {
  83. ATOMIC_PARAM(P_SCENE, Scene); // Scene pointer
  84. ATOMIC_PARAM(P_PARENT, Parent); // Node pointer
  85. ATOMIC_PARAM(P_NODE, Node); // Node pointer
  86. }
  87. /// A child node has been added to a parent node.
  88. ATOMIC_EVENT(E_SCENEEDITCOMPONENTADDEDREMOVED, SceneEditComponentAddedRemoved)
  89. {
  90. ATOMIC_PARAM(P_SCENE, Scene); // Scene pointer
  91. ATOMIC_PARAM(P_NODE, Node); // Node pointer
  92. ATOMIC_PARAM(P_COMPONENT, Component); // Component pointer
  93. ATOMIC_PARAM(P_REMOVED, Removed); // bool
  94. }
  95. ATOMIC_EVENT(E_SCENEEDITPREFABSAVE, SceneEditPrefabSave)
  96. {
  97. ATOMIC_PARAM(P_NODE, Node); // Node pointer
  98. }
  99. ATOMIC_EVENT(E_SCENEEDITPREFABREVERT, SceneEditPrefabRevert)
  100. {
  101. ATOMIC_PARAM(P_NODE, Node); // Node pointer
  102. }
  103. ATOMIC_EVENT(E_SCENEEDITPREFABCOPY, SceneEditPrefabCopy)
  104. {
  105. ATOMIC_PARAM(P_NODE, Node); // Node pointer
  106. }
  107. ATOMIC_EVENT(E_SCENEEDITPREFABPASTE, SceneEditPrefabPaste)
  108. {
  109. ATOMIC_PARAM(P_NODE, Node); // Node pointer
  110. }
  111. ATOMIC_EVENT(E_SCENEEDITPREFABBREAK, SceneEditPrefabBreak)
  112. {
  113. ATOMIC_PARAM(P_NODE, Node); // Node pointer
  114. }
  115. ATOMIC_EVENT(E_SCENEEDITCOMPONENTCOPY, SceneEditComponentCopy)
  116. {
  117. ATOMIC_PARAM(P_COMPONENT, Component); // Component pointer
  118. }
  119. ATOMIC_EVENT(E_SCENEEDITCOMPONENTPASTE, SceneEditComponentPaste)
  120. {
  121. ATOMIC_PARAM(P_COMPONENT, Component); // Component pointer
  122. ATOMIC_PARAM(P_END, End); // bool
  123. }
  124. ATOMIC_EVENT(E_SCENEEDITADDREMOVENODES, SceneEditAddRemoveNodes)
  125. {
  126. ATOMIC_PARAM(P_END, End); // bool
  127. }
  128. ATOMIC_EVENT(E_SCENEEDITSCENEMODIFIED, SceneEditSceneModified)
  129. {
  130. }
  131. ATOMIC_EVENT(E_CUBEMAPRENDERBEGIN, CubemapRenderBegin)
  132. {
  133. }
  134. ATOMIC_EVENT(E_CUBEMAPRENDEREND, CubemapRenderEnd)
  135. {
  136. }
  137. ATOMIC_EVENT(E_COMPONENTEDITEND, ComponentEditEnd)
  138. {
  139. }
  140. ATOMIC_EVENT(E_COLORCHOOSERCHANGED, ColorChooserChanged)
  141. {
  142. ATOMIC_PARAM(P_WIDGET, Widget); // UIWidget
  143. }
  144. ATOMIC_EVENT(E_SELECTIONCREATECOMPONENT, SelectionCreateComponent)
  145. {
  146. ATOMIC_PARAM(P_COMPONENTTYPENAME, ComponentTypeName); // string
  147. }
  148. }