-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Expose "editable_instance" to scripting + Update C++ API #46006
Conversation
…ifies "set_editable_instance" and "is_editable_instance" to better reflect how they work now
I've just seen this comment on another PR saying that having "editable_instance" in the scripting API of Node is not wanted: What is your opinion on the proposed API change of |
They could be in a separate PR. |
Ok, will do so when #20292 gets closed. |
Changes to the API should probably wait until current issues (#46261) caused by the new way of storing editable children info are resolved. |
While exposing 'editable_children' may happen in the future it'll probably require a system for distinguishing editor-only properties/methods, as Akien mentioned here #20569 (comment). I suggest not to wait, remove that part and rename the PR accordingly. |
Closed since "editable_instance" is currently not supposed to be exposed to scripting. |
This PR fixes #20292.
Changes:
editable_instance
flag to scripts:This will allow easier implementation of undo/redo for turning on/off the "Editable children" option and its related actions in the editor.
editable_instance
to simplify its usage and to better reflect how it works today:In the previous implementation, the
set_editable_instance
andis_editable_instance
got called on the owner of a node:This was for historical reasons, as initially the editable_children were managed in a list inside the owner. Today the "editable" state is a simple flag in the Node class itself, and therefore the interface should reflect this:
set_editable_instance
andis_editable_instance
throughout the source code.