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 Create Curve button to Path2D editor #96619

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented Sep 5, 2024

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).

Copy link
Member

@AThousandShips AThousandShips left a comment

Choose a reason for hiding this comment

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

Haven't tested but code looks good and makes sense

@Calinou
Copy link
Member

Calinou commented Sep 5, 2024

Should this also be done for Path3D?

@akien-mga akien-mga modified the milestones: 4.x, 4.4 Sep 6, 2024
@KoBeWi
Copy link
Member Author

KoBeWi commented Sep 6, 2024

Yes.

@KoBeWi KoBeWi requested a review from a team as a code owner September 6, 2024 13:29
@akien-mga akien-mga merged commit a8692c0 into godotengine:master Sep 6, 2024
20 checks passed
@akien-mga
Copy link
Member

Thanks!

@KoBeWi KoBeWi deleted the curve-inator branch September 6, 2024 22:09
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.

4 participants