Add Create Curve button to Path2D editor #96619
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When Path2D has no Curve2D assigned, the toolbar buttons have no effect. Trying to do some operation will just unselect the node. This is a niche problem, because curve is auto-created in Path2D, but it's confusing once you run into it.
This PR adds a "Create Curve" button when no curve is assigned. It replaces the standard toolbar.
godot.windows.editor.dev.x86_64_UMXS1PZIzl.mp4
Unfortunately there doesn't seem to be a way to detect when curve is removed while editing, so you need to re-select the node to update the toolbar. Not sure how to best solve that. I thought about adding some PropertyObserver, but not sure if there is use for it elsewhere (not counting in the future).