-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Allow to copy/paste properties in the inspector #39398
Conversation
They would need different shortcuts. btw the popup menu could be used to include the other feature too 🤔 |
Yeah maybe the copy property path feature could be Shift+Ctrl+C instead of Ctrl+C, if not taken already. |
I would argue the opposite -- since ctrl+c is already used for copying a path (copy_node_path), it would make sense for ctrl+c to also be used for copying a property path, and ctrl+shift+c for copying the property itself. I don't feel strongly though :) |
eh, maybe not. copy_property_path might be more specialized (mainly for |
Remember that we have Paste Property too. It would be weird if copy used Shift and paste not (and counter-intuitive if both used Shift). |
What about combining them and having paste be context-sensitive? Copy the thing, and it will paste either the path or property, depending on what you are pasting into. MacOS implements some things like this, where you can copy and paste, ex. photos, but it will paste different things based on context. It will paste the photo if the paste location accepts photos, paste the filename if you're targeting a normal text field, but pastes the file path if you're pasting into the terminal. Could Godot have something similar? |
@name-here I think the resource clipboard is internal to godot and separate from the system clipboard. So we could have I'm not sure how useful that is though, as I think I'd typically know ahead of time which one I wanted to copy, and might not want to wipe out my other clipboard. |
Superseded by #39404, which is the same but better 🤔 |
Resolves godotengine/godot-proposals#106. Adds the following property menu options with default bindings: - Copy Property (ctrl+c) - Paste Property (ctrl+v) - Copy Property Path (ctrl+shift+c) If you hover over a property label in the inspector dock, you can copy either the property value or the property path to the system clipboard using the shortcuts above This is especially useful for the `AnimationTree`, where code might reference properties like "parameters/state/aim/move/blend_position". One issue is that if you click a property, then click on the node you currently have selected in the node tree, then press ctrl+shift+c, it will still copy the selected property path rather than the node path. If you click on a different node in the nodetree, however, ctrl+shift+c will return to copying the nodepath. The property value copy/paste was implemented by @KoBeWi at godotengine#39398 and merged into this PR due to their similarity.
Resolves godotengine/godot-proposals#106. Adds the following property menu options with default bindings: - Copy Property (ctrl+c) - Paste Property (ctrl+v) - Copy Property Path (ctrl+shift+c) If you hover over a property label in the inspector dock, you can copy either the property value or the property path to the system clipboard using the shortcuts above This is especially useful for the `AnimationTree`, where code might reference properties like "parameters/state/aim/move/blend_position". One issue is that if you click a property, then click on the node you currently have selected in the node tree, then press ctrl+shift+c, it will still copy the selected property path rather than the node path. If you click on a different node in the nodetree, however, ctrl+shift+c will return to copying the nodepath. The property value copy/paste was implemented by KoBeWi at godotengine#39398 and merged into this PR due to their similarity. Backport of 0205fff from master.
Addresses #23024
Unfortunately I couldn't make the shortcuts working, because key events are hijacked by other editor controls. Could be done in another PR probably (maybe after #39039 is merged).
Bugsquad edit: This partially addresses godotengine/godot-proposals#1504.