Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bind Node::force_parent_owned() as make_owned_by_parent() and bind Node::is_owned_by_parent() as is_managed_by_parent(). #89388

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions doc/classes/Node.xml
AThousandShips marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,12 @@
Returns [code]true[/code] if this node is currently inside a [SceneTree]. See also [method get_tree].
</description>
</method>
<method name="is_managed_by_parent" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code] if the node is managed by its parent (see [method mark_managed_by_parent]).
</description>
</method>
<method name="is_multiplayer_authority" qualifiers="const">
<return type="bool" />
<description>
Expand Down Expand Up @@ -667,6 +673,13 @@
Returns [code]true[/code] if the node is processing unhandled key input (see [method set_process_unhandled_key_input]).
</description>
</method>
<method name="mark_managed_by_parent">
<return type="void" />
<description>
Marks this node as being managed by its parent. Parent managed nodes are not duplicated or copied when calling [method duplicate] or [method replace_by].
[b]Note:[/b] Reparenting this node resets the managed status.
</description>
</method>
<method name="move_child">
<return type="void" />
<param index="0" name="child_node" type="Node" />
Expand Down
3 changes: 3 additions & 0 deletions scene/main/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3529,6 +3529,9 @@ void Node::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_unique_name_in_owner", "enable"), &Node::set_unique_name_in_owner);
ClassDB::bind_method(D_METHOD("is_unique_name_in_owner"), &Node::is_unique_name_in_owner);

ClassDB::bind_method(D_METHOD("mark_managed_by_parent"), &Node::force_parent_owned);
ClassDB::bind_method(D_METHOD("is_managed_by_parent"), &Node::is_owned_by_parent);

ClassDB::bind_method(D_METHOD("atr", "message", "context"), &Node::atr, DEFVAL(""));
ClassDB::bind_method(D_METHOD("atr_n", "message", "plural_message", "n", "context"), &Node::atr_n, DEFVAL(""));

Expand Down
Loading