godotengine / godot-proposals

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

Display the estimated value at offset in the Curve resource editor #3267

Open Multirious opened 3 years ago

Multirious commented 3 years ago

Describe the project you are working on

I'm making a signal that will be emitted when a certain point of the curve is reached. Pretty simple.

Describe the problem or limitation you are having in your project

But you can only get its position by using code. I just wanted to know from the inspector and put the offset into a variable from the inspector.

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

It's for quick and easy looking up position in a curve if it does not require any code.

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

Make a popup about the position when hovering over a point. (The value is only estimated.) godot windows opt tools 64_dQe1xej5Fp or a line godot windows opt tools 64_fAhkYNHScr

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

Well, you can write down print( some_curve.get_point_position(0) ) just not very convenient if you need to change and check the position multiple times.

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

It's quite simple, small, and quite a useful feature if you need to look up its position a lot and people might be using it a lot for perfect arrangement for each position.

anvilfolk commented 2 years ago

Currently digging into curves and their editor, just wanted to say this looks easy to implement and is on my radar for the future! :) Subscribing and will update once work is being done on this :)

Calinou commented 2 years ago

This could also be done in the Gradient editor to display the X offset of the currently hovered point.