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

Add a shortcut for copying property paths in the inspector #420

Closed
GameDevLlama opened this issue Jan 30, 2020 · 7 comments
Closed

Add a shortcut for copying property paths in the inspector #420

GameDevLlama opened this issue Jan 30, 2020 · 7 comments

Comments

@GameDevLlama
Copy link

Describe the project you are working on:

No particular one, but it happens for every project which heavily relies on Shaders / AnimationTrees I've been working on.

Describe the problem or limitation you are having in your project:

When having a complex AnimationTree with many Blend / Add / TimeScale related and nested parameters will automatically be exposed to the inspector.

image

Problem / Comfort issue at this point: depending on the complexity of the AnimationTree setup it sometimes gets quite annoying when params need to be configured via code, since you constantly have to switch between the parameter tooltip and the actual script in order to get the params right. (when the param gets longer)

tree["parameters/BlendState2D/1/TimeScale/scale] = x

(even now it required me to switch between the github preview and my markdown)

Describe how this feature / enhancement will help you overcome this problem or limitation:

An additional feature would be a small copy icon:
which would copy the parameters string of the property to the clipboard.

Show a mock up screenshots/video or a flow diagram explaining how your proposal will work:

It's not as beautifully done, but actually that's an easy one:
image

Describe implementation detail for your proposal (in code), if possible:

Sorry, unfortunately I'm still not deeply involved in the editor development.

If this enhancement will not be used often, can it be worked around with a few lines of script?:

Currently it can be done manually only (as far as I know)

Is there a reason why this should be core and not an add-on in the asset library?:

It enhances the comfort of using the editor by a lot, while scripting for objects which heavily use direct change and access of those parameters.

@GameDevLlama GameDevLlama changed the title Shortcut for copying object parameters at the inspector Shortcut for copying object parameters in the inspector Jan 30, 2020
@Calinou
Copy link
Member

Calinou commented Feb 11, 2020

Should this only be exposed for specific nodes? I can imagine adding a "copy" icon to all properties would increase visual noise.

Maybe we should add a "Copy Path" context menu option for individual properties? This will require implementing the context menu in question.

@GameDevLlama
Copy link
Author

GameDevLlama commented Feb 11, 2020

For me personally it just felt odd that godot helps in a lot of situations by autocompletion in gdscript but not on this important case.

When it comes to copying strings of params (AnimationTrees, VisualShader-Uniforms) it quickly gets quite annoying, when you have to switch between the inspector and the script itself in order to get some properties right.

Besides that:
In AnimationTrees it is called

parameters/

While in VisualShader it is called

shader_param/

Which makes it even more confusing when you try to remember if it was singular, or plural and you'll really have to be careful to get those parameters right when using in gd script

@matts-dev
Copy link

I would also appreciate something like this. Right now, the only way I know to do it is to visually copy what the tooltip says. Which is prone to typo issues. Just pressing control+c while over tooltip would work I think?

@Calinou
Copy link
Member

Calinou commented Sep 27, 2020

Just pressing control+c while over tooltip would work I think?

The thing is that you may not be able to hover the tooltip in the first place. If you hover the mouse long enough over a property for the tooltip to appear, it would make it more difficult to discard the tooltip to view/modify the properties above. It's the kind of thing that could become really irritating over time 🙂

@Calinou Calinou changed the title Shortcut for copying object parameters in the inspector Add a shortcut for copying property paths in the inspector Sep 28, 2020
@belzecue
Copy link

belzecue commented Apr 3, 2021

Not being able to easily copy properties paths from the editor is a big workflow drag.

I can imagine adding a "copy" icon to all properties would increase visual noise

No visual change is desirable or needed.

Just pressing control+c while over tooltip would work I think?

Solution to Calinou's concern: simply make it so that e.g. double-click on the property name in the inspector automatically puts the path string into the OS clipboard. Or, right-click on property name for a pop-up menu that includes "Copy property path" -- I think this is only warranted if there will be other actions added in future to do with handling property paths (unlikely?). Or, in a variation of mattstone22133's suggestion, click on the property name to highlight it then press CTRL+C to copy path to clipboard.

@Jummit
Copy link

Jummit commented Apr 3, 2021

Copying by double clicking and showing a notification afterwards would be my preferred solution.

@Calinou
Copy link
Member

Calinou commented Sep 3, 2021

Duplicate of #106 (implemented by godotengine/godot#39404).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants