2017-09-12 20:42:36 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
2022-08-05 16:51:38 +00:00
<class name= "SceneState" inherits= "Reference" version= "3.6" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../class.xsd" >
2017-09-12 20:42:36 +00:00
<brief_description >
2017-12-04 03:21:59 +00:00
A script interface to a scene file's data.
2017-09-12 20:42:36 +00:00
</brief_description>
<description >
2018-09-16 17:52:21 +00:00
Maintains a list of resources, nodes, exported, and overridden properties, and built-in scripts associated with a scene.
2019-06-26 13:57:13 +00:00
This class cannot be instantiated directly, it is retrieved for a given scene as the result of [method PackedScene.get_state].
2017-09-12 20:42:36 +00:00
</description>
<tutorials >
</tutorials>
<methods >
<method name= "get_connection_binds" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "Array" />
<argument index= "0" name= "idx" type= "int" />
2017-09-12 20:42:36 +00:00
<description >
2017-12-04 03:21:59 +00:00
Returns the list of bound parameters for the signal at [code]idx[/code].
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "get_connection_count" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "int" />
2017-09-12 20:42:36 +00:00
<description >
2017-12-04 03:21:59 +00:00
Returns the number of signal connections in the scene.
2019-06-26 13:57:13 +00:00
The [code]idx[/code] argument used to query connection metadata in other [code]get_connection_*[/code] methods in the interval [code][0, get_connection_count() - 1][/code].
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "get_connection_flags" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "int" />
<argument index= "0" name= "idx" type= "int" />
2017-09-12 20:42:36 +00:00
<description >
2019-06-26 13:57:13 +00:00
Returns the connection flags for the signal at [code]idx[/code]. See [enum Object.ConnectFlags] constants.
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "get_connection_method" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "String" />
<argument index= "0" name= "idx" type= "int" />
2017-09-12 20:42:36 +00:00
<description >
2017-12-04 03:21:59 +00:00
Returns the method connected to the signal at [code]idx[/code].
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "get_connection_signal" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "String" />
<argument index= "0" name= "idx" type= "int" />
2017-09-12 20:42:36 +00:00
<description >
2017-12-04 03:21:59 +00:00
Returns the name of the signal at [code]idx[/code].
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "get_connection_source" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "NodePath" />
<argument index= "0" name= "idx" type= "int" />
2017-09-12 20:42:36 +00:00
<description >
2017-12-04 03:21:59 +00:00
Returns the path to the node that owns the signal at [code]idx[/code], relative to the root node.
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "get_connection_target" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "NodePath" />
<argument index= "0" name= "idx" type= "int" />
2017-09-12 20:42:36 +00:00
<description >
2017-12-04 03:21:59 +00:00
Returns the path to the node that owns the method connected to the signal at [code]idx[/code], relative to the root node.
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "get_node_count" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "int" />
2017-09-12 20:42:36 +00:00
<description >
2017-12-04 03:21:59 +00:00
Returns the number of nodes in the scene.
2019-06-26 13:57:13 +00:00
The [code]idx[/code] argument used to query node data in other [code]get_node_*[/code] methods in the interval [code][0, get_node_count() - 1][/code].
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "get_node_groups" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "PoolStringArray" />
<argument index= "0" name= "idx" type= "int" />
2017-09-12 20:42:36 +00:00
<description >
2017-12-04 03:21:59 +00:00
Returns the list of group names associated with the node at [code]idx[/code].
2017-09-12 20:42:36 +00:00
</description>
</method>
2017-12-16 19:34:16 +00:00
<method name= "get_node_index" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "int" />
<argument index= "0" name= "idx" type= "int" />
2017-12-16 19:34:16 +00:00
<description >
2019-06-26 13:57:13 +00:00
Returns the node's index, which is its position relative to its siblings. This is only relevant and saved in scenes for cases where new nodes are added to an instanced or inherited scene among siblings from the base scene. Despite the name, this index is not related to the [code]idx[/code] argument used here and in other methods.
2017-12-16 19:34:16 +00:00
</description>
</method>
2017-09-12 20:42:36 +00:00
<method name= "get_node_instance" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "PackedScene" />
<argument index= "0" name= "idx" type= "int" />
2017-09-12 20:42:36 +00:00
<description >
2019-06-26 13:57:13 +00:00
Returns a [PackedScene] for the node at [code]idx[/code] (i.e. the whole branch starting at this node, with its child nodes and resources), or [code]null[/code] if the node is not an instance.
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "get_node_instance_placeholder" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "String" />
<argument index= "0" name= "idx" type= "int" />
2017-09-12 20:42:36 +00:00
<description >
2017-12-04 03:21:59 +00:00
Returns the path to the represented scene file if the node at [code]idx[/code] is an [InstancePlaceholder].
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "get_node_name" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "String" />
<argument index= "0" name= "idx" type= "int" />
2017-09-12 20:42:36 +00:00
<description >
2017-12-04 03:21:59 +00:00
Returns the name of the node at [code]idx[/code].
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "get_node_owner_path" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "NodePath" />
<argument index= "0" name= "idx" type= "int" />
2017-09-12 20:42:36 +00:00
<description >
2017-12-04 03:21:59 +00:00
Returns the path to the owner of the node at [code]idx[/code], relative to the root node.
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "get_node_path" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "NodePath" />
<argument index= "0" name= "idx" type= "int" />
<argument index= "1" name= "for_parent" type= "bool" default= "false" />
2017-09-12 20:42:36 +00:00
<description >
2017-12-04 03:21:59 +00:00
Returns the path to the node at [code]idx[/code].
2019-06-26 13:57:13 +00:00
If [code]for_parent[/code] is [code]true[/code], returns the path of the [code]idx[/code] node's parent instead.
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "get_node_property_count" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "int" />
<argument index= "0" name= "idx" type= "int" />
2017-09-12 20:42:36 +00:00
<description >
2017-12-04 03:21:59 +00:00
Returns the number of exported or overridden properties for the node at [code]idx[/code].
2019-06-26 13:57:13 +00:00
The [code]prop_idx[/code] argument used to query node property data in other [code]get_node_property_*[/code] methods in the interval [code][0, get_node_property_count() - 1][/code].
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "get_node_property_name" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "String" />
<argument index= "0" name= "idx" type= "int" />
<argument index= "1" name= "prop_idx" type= "int" />
2017-09-12 20:42:36 +00:00
<description >
2017-12-04 03:21:59 +00:00
Returns the name of the property at [code]prop_idx[/code] for the node at [code]idx[/code].
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "get_node_property_value" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "Variant" />
<argument index= "0" name= "idx" type= "int" />
<argument index= "1" name= "prop_idx" type= "int" />
2017-09-12 20:42:36 +00:00
<description >
2017-12-04 03:21:59 +00:00
Returns the value of the property at [code]prop_idx[/code] for the node at [code]idx[/code].
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "get_node_type" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "String" />
<argument index= "0" name= "idx" type= "int" />
2017-09-12 20:42:36 +00:00
<description >
2017-12-04 03:21:59 +00:00
Returns the type of the node at [code]idx[/code].
2017-09-12 20:42:36 +00:00
</description>
</method>
<method name= "is_node_instance_placeholder" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "bool" />
<argument index= "0" name= "idx" type= "int" />
2017-09-12 20:42:36 +00:00
<description >
2017-12-04 03:21:59 +00:00
Returns [code]true[/code] if the node at [code]idx[/code] is an [InstancePlaceholder].
2017-09-12 20:42:36 +00:00
</description>
</method>
</methods>
<constants >
2017-11-24 22:16:30 +00:00
<constant name= "GEN_EDIT_STATE_DISABLED" value= "0" enum= "GenEditState" >
2017-12-04 03:21:59 +00:00
If passed to [method PackedScene.instance], blocks edits to the scene state.
2017-09-12 20:42:36 +00:00
</constant>
2017-11-24 22:16:30 +00:00
<constant name= "GEN_EDIT_STATE_INSTANCE" value= "1" enum= "GenEditState" >
2019-06-21 23:04:47 +00:00
If passed to [method PackedScene.instance], provides inherited scene resources to the local scene.
[b]Note:[/b] Only available in editor builds.
2017-09-12 20:42:36 +00:00
</constant>
2017-11-24 22:16:30 +00:00
<constant name= "GEN_EDIT_STATE_MAIN" value= "2" enum= "GenEditState" >
2019-06-21 23:04:47 +00:00
If passed to [method PackedScene.instance], provides local scene resources to the local scene. Only the main scene should receive the main edit state.
[b]Note:[/b] Only available in editor builds.
2017-09-12 20:42:36 +00:00
</constant>
2021-10-26 19:12:35 +00:00
<constant name= "GEN_EDIT_STATE_MAIN_INHERITED" value= "3" enum= "GenEditState" >
If passed to [method PackedScene.instance], it's similar to [constant GEN_EDIT_STATE_MAIN], but for the case where the scene is being instantiated to be the base of another one.
[b]Note:[/b] Only available in editor builds.
</constant>
2017-09-12 20:42:36 +00:00
</constants>
</class>