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

Copy/Paste property paths/values in inspector. #54913

Merged
merged 1 commit into from
Jan 4, 2022

Conversation

rcorre
Copy link
Contributor

@rcorre rcorre commented Nov 12, 2021

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 #39398 and
merged into this PR due to their similarity.

Backport of 0205fff from master.

Copy link
Member

@KoBeWi KoBeWi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The menu is different than on master:
image
vs
image
It's missing separator and the Pin Value is at the top. This is because they were added in a different order. It should be made consistent.

Also the backport is missing #52376 bugfix.

@rcorre rcorre force-pushed the copy-backport branch 2 times, most recently from 41eac8b to 40b2a14 Compare December 27, 2021 13:37
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.
Copy link
Member

@KoBeWi KoBeWi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok now.

The Ctrl+V paste shortcut doesn't work for 2D nodes, probably because of the V being hijacked by 2D editor. It's not really related to this PR though.

@akien-mga akien-mga merged commit fde61a0 into godotengine:3.x Jan 4, 2022
@akien-mga
Copy link
Member

Thanks!

@rcorre rcorre deleted the copy-backport branch June 18, 2023 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants