godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.15k stars 97 forks source link

Stop Godot Inspector from resetting when same object/file type is opened #5915

Open Engylizium opened 1 year ago

Engylizium commented 1 year ago

Describe the project you are working on

I'm prototyping 3D game with a lot of 2D elements. Unrelated to the issue

Describe the problem or limitation you are having in your project

I was trying to create color palette and I often had to switch between materials to make adjustments. The thing is, whenever I open a material Inspector resets to it's default state and opening Material Emission Color every time is a bit annoying. While I'm at it - would be nice to switch between objects of the same type on 1 click instead of 2 for convenience.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Already described above. It will help to get rid of annoyance

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

We can add PropertyType_matches function to check if we opened same object type and tell editor to update variables and stuff to match newly opened object. I'm sorry for half assed description, I don't know where to look for function responsible for opening Inspector and it will take a lot of time to look for it. And I absolutely don't have any idea where to look for "2 clicks to open" stuff

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

I think it will be constantly used and it should be pretty quick fix too

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

Faster editor navigation is always a plus

Calinou commented 1 year ago

Are you referring to folding state not being persisted when reselecting a node? Folding state is currently determined by whether any property is modified from its default value in the section.