The "Save Branch as Scene" button is clipped, and clicking it does not work in Godot 4 anymore.
This PR replaces the button with more idiomatic menu items.
It also adds two options:
"Copy path to clipboard" copies the current branch's full path
"Copy node types to clipboard" copies the current branch's path in tuples of [type, nodeName].
Why two new functions?
At GDQuest, we're building editor plugins that need to hook deep into the existing interface (far more than the regular add_control_to_dock functions permit).
These elements are only sometimes named and can move around, so having a branch path is often insufficient.
Extracting the paths and types allows us to build proper queries to find the needed elements by mixing up rules like "find a child of a TYPE with name NAME".
Most people using this plugin may require such information to target the nodes they need, so this has a generic value. I have wanted this feature in nearly every plugin I've worked on.
The "Save Branch as Scene" button is clipped, and clicking it does not work in Godot 4 anymore.
This PR replaces the button with more idiomatic menu items.
It also adds two options:
[type, nodeName]
.Why two new functions?
At GDQuest, we're building editor plugins that need to hook deep into the existing interface (far more than the regular
add_control_to_dock
functions permit).These elements are only sometimes named and can move around, so having a branch path is often insufficient.
Extracting the paths and types allows us to build proper queries to find the needed elements by mixing up rules like "find a child of a
TYPE
with nameNAME
".Most people using this plugin may require such information to target the nodes they need, so this has a generic value. I have wanted this feature in nearly every plugin I've worked on.