SceneState.xml 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="SceneState" inherits="Reference" category="Core" version="3.1">
  3. <brief_description>
  4. A script interface to a scene file's data.
  5. </brief_description>
  6. <description>
  7. Maintains a list of resources, nodes, exported, and overridden properties, and built-in scripts associated with a scene.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <demos>
  12. </demos>
  13. <methods>
  14. <method name="get_connection_binds" qualifiers="const">
  15. <return type="Array">
  16. </return>
  17. <argument index="0" name="idx" type="int">
  18. </argument>
  19. <description>
  20. Returns the list of bound parameters for the signal at [code]idx[/code].
  21. </description>
  22. </method>
  23. <method name="get_connection_count" qualifiers="const">
  24. <return type="int">
  25. </return>
  26. <description>
  27. Returns the number of signal connections in the scene.
  28. </description>
  29. </method>
  30. <method name="get_connection_flags" qualifiers="const">
  31. <return type="int">
  32. </return>
  33. <argument index="0" name="idx" type="int">
  34. </argument>
  35. <description>
  36. Returns the flags for the signal at [code]idx[/code]. See [Object]'s [code]CONNECT_*[/code] flags.
  37. </description>
  38. </method>
  39. <method name="get_connection_method" qualifiers="const">
  40. <return type="String">
  41. </return>
  42. <argument index="0" name="idx" type="int">
  43. </argument>
  44. <description>
  45. Returns the method connected to the signal at [code]idx[/code].
  46. </description>
  47. </method>
  48. <method name="get_connection_signal" qualifiers="const">
  49. <return type="String">
  50. </return>
  51. <argument index="0" name="idx" type="int">
  52. </argument>
  53. <description>
  54. Returns the name of the signal at [code]idx[/code].
  55. </description>
  56. </method>
  57. <method name="get_connection_source" qualifiers="const">
  58. <return type="NodePath">
  59. </return>
  60. <argument index="0" name="idx" type="int">
  61. </argument>
  62. <description>
  63. Returns the path to the node that owns the signal at [code]idx[/code], relative to the root node.
  64. </description>
  65. </method>
  66. <method name="get_connection_target" qualifiers="const">
  67. <return type="NodePath">
  68. </return>
  69. <argument index="0" name="idx" type="int">
  70. </argument>
  71. <description>
  72. Returns the path to the node that owns the method connected to the signal at [code]idx[/code], relative to the root node.
  73. </description>
  74. </method>
  75. <method name="get_node_count" qualifiers="const">
  76. <return type="int">
  77. </return>
  78. <description>
  79. Returns the number of nodes in the scene.
  80. </description>
  81. </method>
  82. <method name="get_node_groups" qualifiers="const">
  83. <return type="PoolStringArray">
  84. </return>
  85. <argument index="0" name="idx" type="int">
  86. </argument>
  87. <description>
  88. Returns the list of group names associated with the node at [code]idx[/code].
  89. </description>
  90. </method>
  91. <method name="get_node_index" qualifiers="const">
  92. <return type="int">
  93. </return>
  94. <argument index="0" name="idx" type="int">
  95. </argument>
  96. <description>
  97. </description>
  98. </method>
  99. <method name="get_node_instance" qualifiers="const">
  100. <return type="PackedScene">
  101. </return>
  102. <argument index="0" name="idx" type="int">
  103. </argument>
  104. <description>
  105. Returns the scene for the node at [code]idx[/code] or [code]null[/code] if the node is not an instance.
  106. </description>
  107. </method>
  108. <method name="get_node_instance_placeholder" qualifiers="const">
  109. <return type="String">
  110. </return>
  111. <argument index="0" name="idx" type="int">
  112. </argument>
  113. <description>
  114. Returns the path to the represented scene file if the node at [code]idx[/code] is an [InstancePlaceholder].
  115. </description>
  116. </method>
  117. <method name="get_node_name" qualifiers="const">
  118. <return type="String">
  119. </return>
  120. <argument index="0" name="idx" type="int">
  121. </argument>
  122. <description>
  123. Returns the name of the node at [code]idx[/code].
  124. </description>
  125. </method>
  126. <method name="get_node_owner_path" qualifiers="const">
  127. <return type="NodePath">
  128. </return>
  129. <argument index="0" name="idx" type="int">
  130. </argument>
  131. <description>
  132. Returns the path to the owner of the node at [code]idx[/code], relative to the root node.
  133. </description>
  134. </method>
  135. <method name="get_node_path" qualifiers="const">
  136. <return type="NodePath">
  137. </return>
  138. <argument index="0" name="idx" type="int">
  139. </argument>
  140. <argument index="1" name="for_parent" type="bool" default="false">
  141. </argument>
  142. <description>
  143. Returns the path to the node at [code]idx[/code].
  144. </description>
  145. </method>
  146. <method name="get_node_property_count" qualifiers="const">
  147. <return type="int">
  148. </return>
  149. <argument index="0" name="idx" type="int">
  150. </argument>
  151. <description>
  152. Returns the number of exported or overridden properties for the node at [code]idx[/code].
  153. </description>
  154. </method>
  155. <method name="get_node_property_name" qualifiers="const">
  156. <return type="String">
  157. </return>
  158. <argument index="0" name="idx" type="int">
  159. </argument>
  160. <argument index="1" name="prop_idx" type="int">
  161. </argument>
  162. <description>
  163. Returns the name of the property at [code]prop_idx[/code] for the node at [code]idx[/code].
  164. </description>
  165. </method>
  166. <method name="get_node_property_value" qualifiers="const">
  167. <return type="Variant">
  168. </return>
  169. <argument index="0" name="idx" type="int">
  170. </argument>
  171. <argument index="1" name="prop_idx" type="int">
  172. </argument>
  173. <description>
  174. Returns the value of the property at [code]prop_idx[/code] for the node at [code]idx[/code].
  175. </description>
  176. </method>
  177. <method name="get_node_type" qualifiers="const">
  178. <return type="String">
  179. </return>
  180. <argument index="0" name="idx" type="int">
  181. </argument>
  182. <description>
  183. Returns the type of the node at [code]idx[/code].
  184. </description>
  185. </method>
  186. <method name="is_node_instance_placeholder" qualifiers="const">
  187. <return type="bool">
  188. </return>
  189. <argument index="0" name="idx" type="int">
  190. </argument>
  191. <description>
  192. Returns [code]true[/code] if the node at [code]idx[/code] is an [InstancePlaceholder].
  193. </description>
  194. </method>
  195. </methods>
  196. <constants>
  197. <constant name="GEN_EDIT_STATE_DISABLED" value="0" enum="GenEditState">
  198. If passed to [method PackedScene.instance], blocks edits to the scene state.
  199. </constant>
  200. <constant name="GEN_EDIT_STATE_INSTANCE" value="1" enum="GenEditState">
  201. If passed to [method PackedScene.instance], provides inherited scene resources to the local scene. Requires tools compiled.
  202. </constant>
  203. <constant name="GEN_EDIT_STATE_MAIN" value="2" enum="GenEditState">
  204. If passed to [method PackedScene.instance], provides local scene resources to the local scene. Only the main scene should receive the main edit state. Requires tools compiled.
  205. </constant>
  206. </constants>
  207. </class>