class_scenestate.rst 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the SceneState.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_SceneState:
  5. SceneState
  6. ==========
  7. **Inherits:** :ref:`Reference<class_reference>` **<** :ref:`Object<class_object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. A script interface to a scene file's data.
  12. Member Functions
  13. ----------------
  14. +------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
  15. | :ref:`Array<class_array>` | :ref:`get_connection_binds<class_SceneState_get_connection_binds>` **(** :ref:`int<class_int>` idx **)** const |
  16. +------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
  17. | :ref:`int<class_int>` | :ref:`get_connection_count<class_SceneState_get_connection_count>` **(** **)** const |
  18. +------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
  19. | :ref:`int<class_int>` | :ref:`get_connection_flags<class_SceneState_get_connection_flags>` **(** :ref:`int<class_int>` idx **)** const |
  20. +------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
  21. | :ref:`String<class_string>` | :ref:`get_connection_method<class_SceneState_get_connection_method>` **(** :ref:`int<class_int>` idx **)** const |
  22. +------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
  23. | :ref:`String<class_string>` | :ref:`get_connection_signal<class_SceneState_get_connection_signal>` **(** :ref:`int<class_int>` idx **)** const |
  24. +------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`NodePath<class_nodepath>` | :ref:`get_connection_source<class_SceneState_get_connection_source>` **(** :ref:`int<class_int>` idx **)** const |
  26. +------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
  27. | :ref:`NodePath<class_nodepath>` | :ref:`get_connection_target<class_SceneState_get_connection_target>` **(** :ref:`int<class_int>` idx **)** const |
  28. +------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
  29. | :ref:`int<class_int>` | :ref:`get_node_count<class_SceneState_get_node_count>` **(** **)** const |
  30. +------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | :ref:`PoolStringArray<class_poolstringarray>` | :ref:`get_node_groups<class_SceneState_get_node_groups>` **(** :ref:`int<class_int>` idx **)** const |
  32. +------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | :ref:`int<class_int>` | :ref:`get_node_index<class_SceneState_get_node_index>` **(** :ref:`int<class_int>` idx **)** const |
  34. +------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | :ref:`PackedScene<class_packedscene>` | :ref:`get_node_instance<class_SceneState_get_node_instance>` **(** :ref:`int<class_int>` idx **)** const |
  36. +------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | :ref:`String<class_string>` | :ref:`get_node_instance_placeholder<class_SceneState_get_node_instance_placeholder>` **(** :ref:`int<class_int>` idx **)** const |
  38. +------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | :ref:`String<class_string>` | :ref:`get_node_name<class_SceneState_get_node_name>` **(** :ref:`int<class_int>` idx **)** const |
  40. +------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | :ref:`NodePath<class_nodepath>` | :ref:`get_node_owner_path<class_SceneState_get_node_owner_path>` **(** :ref:`int<class_int>` idx **)** const |
  42. +------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
  43. | :ref:`NodePath<class_nodepath>` | :ref:`get_node_path<class_SceneState_get_node_path>` **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` for_parent=false **)** const |
  44. +------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
  45. | :ref:`int<class_int>` | :ref:`get_node_property_count<class_SceneState_get_node_property_count>` **(** :ref:`int<class_int>` idx **)** const |
  46. +------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
  47. | :ref:`String<class_string>` | :ref:`get_node_property_name<class_SceneState_get_node_property_name>` **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` prop_idx **)** const |
  48. +------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
  49. | :ref:`Variant<class_variant>` | :ref:`get_node_property_value<class_SceneState_get_node_property_value>` **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` prop_idx **)** const |
  50. +------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
  51. | :ref:`String<class_string>` | :ref:`get_node_type<class_SceneState_get_node_type>` **(** :ref:`int<class_int>` idx **)** const |
  52. +------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
  53. | :ref:`bool<class_bool>` | :ref:`is_node_instance_placeholder<class_SceneState_is_node_instance_placeholder>` **(** :ref:`int<class_int>` idx **)** const |
  54. +------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------+
  55. Enums
  56. -----
  57. .. _enum_SceneState_GenEditState:
  58. enum **GenEditState**
  59. - **GEN_EDIT_STATE_DISABLED** = **0** --- If passed to :ref:`PackedScene.instance<class_PackedScene_instance>`, blocks edits to the scene state.
  60. - **GEN_EDIT_STATE_INSTANCE** = **1** --- If passed to :ref:`PackedScene.instance<class_PackedScene_instance>`, provides inherited scene resources to the local scene. Requires tools compiled.
  61. - **GEN_EDIT_STATE_MAIN** = **2** --- If passed to :ref:`PackedScene.instance<class_PackedScene_instance>`, provides local scene resources to the local scene. Only the main scene should receive the main edit state. Requires tools compiled.
  62. Description
  63. -----------
  64. Maintains a list of resources, nodes, exported and overridden properties, and built-in scripts associated with a scene.
  65. Member Function Description
  66. ---------------------------
  67. .. _class_SceneState_get_connection_binds:
  68. - :ref:`Array<class_array>` **get_connection_binds** **(** :ref:`int<class_int>` idx **)** const
  69. Returns the list of bound parameters for the signal at ``idx``.
  70. .. _class_SceneState_get_connection_count:
  71. - :ref:`int<class_int>` **get_connection_count** **(** **)** const
  72. Returns the number of signal connections in the scene.
  73. .. _class_SceneState_get_connection_flags:
  74. - :ref:`int<class_int>` **get_connection_flags** **(** :ref:`int<class_int>` idx **)** const
  75. Returns the flags for the signal at ``idx``. See :ref:`Object<class_object>`'s ``CONNECT_*`` flags.
  76. .. _class_SceneState_get_connection_method:
  77. - :ref:`String<class_string>` **get_connection_method** **(** :ref:`int<class_int>` idx **)** const
  78. Returns the method connected to the signal at ``idx``.
  79. .. _class_SceneState_get_connection_signal:
  80. - :ref:`String<class_string>` **get_connection_signal** **(** :ref:`int<class_int>` idx **)** const
  81. Returns the name of the signal at ``idx``.
  82. .. _class_SceneState_get_connection_source:
  83. - :ref:`NodePath<class_nodepath>` **get_connection_source** **(** :ref:`int<class_int>` idx **)** const
  84. Returns the path to the node that owns the signal at ``idx``, relative to the root node.
  85. .. _class_SceneState_get_connection_target:
  86. - :ref:`NodePath<class_nodepath>` **get_connection_target** **(** :ref:`int<class_int>` idx **)** const
  87. Returns the path to the node that owns the method connected to the signal at ``idx``, relative to the root node.
  88. .. _class_SceneState_get_node_count:
  89. - :ref:`int<class_int>` **get_node_count** **(** **)** const
  90. Returns the number of nodes in the scene.
  91. .. _class_SceneState_get_node_groups:
  92. - :ref:`PoolStringArray<class_poolstringarray>` **get_node_groups** **(** :ref:`int<class_int>` idx **)** const
  93. Returns the list of group names associated with the node at ``idx``.
  94. .. _class_SceneState_get_node_index:
  95. - :ref:`int<class_int>` **get_node_index** **(** :ref:`int<class_int>` idx **)** const
  96. .. _class_SceneState_get_node_instance:
  97. - :ref:`PackedScene<class_packedscene>` **get_node_instance** **(** :ref:`int<class_int>` idx **)** const
  98. Returns the scene for the node at ``idx`` or ``null`` if the node is not an instance.
  99. .. _class_SceneState_get_node_instance_placeholder:
  100. - :ref:`String<class_string>` **get_node_instance_placeholder** **(** :ref:`int<class_int>` idx **)** const
  101. Returns the path to the represented scene file if the node at ``idx`` is an :ref:`InstancePlaceholder<class_instanceplaceholder>`.
  102. .. _class_SceneState_get_node_name:
  103. - :ref:`String<class_string>` **get_node_name** **(** :ref:`int<class_int>` idx **)** const
  104. Returns the name of the node at ``idx``.
  105. .. _class_SceneState_get_node_owner_path:
  106. - :ref:`NodePath<class_nodepath>` **get_node_owner_path** **(** :ref:`int<class_int>` idx **)** const
  107. Returns the path to the owner of the node at ``idx``, relative to the root node.
  108. .. _class_SceneState_get_node_path:
  109. - :ref:`NodePath<class_nodepath>` **get_node_path** **(** :ref:`int<class_int>` idx, :ref:`bool<class_bool>` for_parent=false **)** const
  110. Returns the path to the node at ``idx``.
  111. .. _class_SceneState_get_node_property_count:
  112. - :ref:`int<class_int>` **get_node_property_count** **(** :ref:`int<class_int>` idx **)** const
  113. Returns the number of exported or overridden properties for the node at ``idx``.
  114. .. _class_SceneState_get_node_property_name:
  115. - :ref:`String<class_string>` **get_node_property_name** **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` prop_idx **)** const
  116. Returns the name of the property at ``prop_idx`` for the node at ``idx``.
  117. .. _class_SceneState_get_node_property_value:
  118. - :ref:`Variant<class_variant>` **get_node_property_value** **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` prop_idx **)** const
  119. Returns the value of the property at ``prop_idx`` for the node at ``idx``.
  120. .. _class_SceneState_get_node_type:
  121. - :ref:`String<class_string>` **get_node_type** **(** :ref:`int<class_int>` idx **)** const
  122. Returns the type of the node at ``idx``.
  123. .. _class_SceneState_is_node_instance_placeholder:
  124. - :ref:`bool<class_bool>` **is_node_instance_placeholder** **(** :ref:`int<class_int>` idx **)** const
  125. Returns ``true`` if the node at ``idx`` is an :ref:`InstancePlaceholder<class_instanceplaceholder>`.