diff options
author | Lyuma <xn.lyuma@gmail.com> | 2021-08-22 19:18:29 -0700 |
---|---|---|
committer | Lyuma <xn.lyuma@gmail.com> | 2021-08-23 21:45:18 -0700 |
commit | 7eb6ae279848e8300431cfe925be70fa7ffd7299 (patch) | |
tree | 5018d3b50259dc4cdefec5824a104a3ed12c35dd | |
parent | b4cea107712b12ca6874fca189eef89cd37b30d7 (diff) |
Make Node editable_instance methods available to GDScript
-rw-r--r-- | doc/classes/Node.xml | 19 | ||||
-rw-r--r-- | scene/main/node.cpp | 2 |
2 files changed, 19 insertions, 2 deletions
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index 97e6c71ef9..25f1f50b6f 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -384,7 +384,14 @@ <method name="is_displayed_folded" qualifiers="const"> <return type="bool" /> <description> - Returns [code]true[/code] if the node is folded (collapsed) in the Scene dock. + Returns [code]true[/code] if the node is folded (collapsed) in the Scene dock. This method is only intended for use with editor tooling. + </description> + </method> + <method name="is_editable_instance" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="node" type="Node" /> + <description> + Returns [code]true[/code] if [code]node[/code] has editable children enabled relative to this node. This method is only intended for use with editor tooling. </description> </method> <method name="is_greater_than" qualifiers="const"> @@ -592,7 +599,15 @@ <return type="void" /> <argument index="0" name="fold" type="bool" /> <description> - Sets the folded state of the node in the Scene dock. + Sets the folded state of the node in the Scene dock. This method is only intended for use with editor tooling. + </description> + </method> + <method name="set_editable_instance"> + <return type="void" /> + <argument index="0" name="node" type="Node" /> + <argument index="1" name="is_editable" type="bool" /> + <description> + Sets the editable children state of [code]node[/code] relative to this node. This method is only intended for use with editor tooling. </description> </method> <method name="set_editor_description"> diff --git a/scene/main/node.cpp b/scene/main/node.cpp index 1d617d1ff7..de36fe4104 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -2616,6 +2616,8 @@ void Node::_bind_methods() { ClassDB::bind_method(D_METHOD("set_scene_instance_load_placeholder", "load_placeholder"), &Node::set_scene_instance_load_placeholder); ClassDB::bind_method(D_METHOD("get_scene_instance_load_placeholder"), &Node::get_scene_instance_load_placeholder); + ClassDB::bind_method(D_METHOD("set_editable_instance", "node", "is_editable"), &Node::set_editable_instance); + ClassDB::bind_method(D_METHOD("is_editable_instance", "node"), &Node::is_editable_instance); ClassDB::bind_method(D_METHOD("get_viewport"), &Node::get_viewport); |