Make Node editable_instance methods available to GDScript

(cherry picked from commit 7eb6ae2798)
This commit is contained in:
Lyuma 2021-08-22 19:18:29 -07:00 committed by Haoyu Qiu
parent 1b607b04b4
commit 099e90e00d
2 changed files with 19 additions and 2 deletions

View file

@ -359,7 +359,14 @@
<method name="is_displayed_folded" qualifiers="const"> <method name="is_displayed_folded" qualifiers="const">
<return type="bool" /> <return type="bool" />
<description> <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> </description>
</method> </method>
<method name="is_greater_than" qualifiers="const"> <method name="is_greater_than" qualifiers="const">
@ -649,7 +656,15 @@
<return type="void" /> <return type="void" />
<argument index="0" name="fold" type="bool" /> <argument index="0" name="fold" type="bool" />
<description> <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> </description>
</method> </method>
<method name="set_network_master"> <method name="set_network_master">

View file

@ -3078,6 +3078,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("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("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); ClassDB::bind_method(D_METHOD("get_viewport"), &Node::get_viewport);