-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
base: master
Are you sure you want to change the base?
Conversation
a6d3271
to
a7cb595
Compare
2b375dc
to
7c4aac6
Compare
Node::force_parent_owned()
for plugin development.Node::set_owned_by_parent()
and bind new property owned_by_parent
.
7fbe8f8
to
c8bd229
Compare
I decide to bind a new property |
fc527ac
to
d81b81f
Compare
I see no valid reason to be able to clear this value, and it creates a huge risk for unintended errors IMO |
d81b81f
to
eef3bfa
Compare
Like my comment in #9282. If I neglect something, please tell me, I will add a new field (may be named "owned_by_parent_override") to handle this feature. |
It does, you can't clear this, only set it Sure you can break things in ways, but I don't think we should add features that make it easier What's the use case for clearing this value? The setting the value is reasonable, but there's no reason I can see to clear it |
A little confused, is the "clearing this value" you mentioned equal to |
Yes, that's what I mean :) there's no way to set it to false currently, because it's not needed, or safe |
Maybe a internal node which need processed, and take it out as a regular node at some situation (maybe extract a internal node and make it to be a regular node by a tool button). Like To be honest, I didn't think much about clearing this value. I just want it to become an property for convenience (both get and set). |
Let's keep it as a method and not a property, there's no reason to clear it, and it is wrong in my opinion, there's no reason to ever clear it, it's not a matter of assuming, it's a matter of what this property is for and what it makes sense for If you want to clear it all you need to do is reparent it |
eef3bfa
to
185585b
Compare
Node::set_owned_by_parent()
and bind new property owned_by_parent
.Node::force_parent_owned()
as make_owned_by_parent()
and bind Node::is_owned_by_parent()
.
185585b
to
613f067
Compare
doc/classes/Node.xml
Outdated
<return type="void" /> | ||
<description> | ||
Marks the 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] You can reparent a managed node to make it become a regular node. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this is necessary to mention
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[b]Note:[/b] You can reparent a managed node to make it become a regular node. | |
[b]Note:[/b] Reparenting this node resets the managed status. |
If we need to keep it
613f067
to
552cf9c
Compare
Node::force_parent_owned()
as make_owned_by_parent()
and bind Node::is_owned_by_parent()
.Node::force_parent_owned()
as make_owned_by_parent()
and bind Node::is_owned_by_parent()
as is_managed_by_parent()
.
`Node::is_owned__by_parent()` as `is_managed_by_parent()`
552cf9c
to
240d1a3
Compare
On a second though there might be a better solution. See my comment in the proposal.
Close proposal #9282.