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

UX and stability improvements for Path3D node #89847

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

GreenCrowDev
Copy link
Contributor

@GreenCrowDev GreenCrowDev commented Mar 24, 2024

UX and stability improvements for Path3D node.

Goals are:

  • Declutter the UI showing only the appropriate handles in the respective modes;
  • Solving issues caused by subgizmos overlapping each other.

Closes #89138
Closes #85795
Closes #88276 offering a "cleaner" solution
Closes godotengine/godot-proposals#8890

TODOs:

  • Show transform gizmo only when in Select Points mode;
  • Show secondary handles only when in Select Control Points mode;
  • Clear subgizmo selection when changing mode;
  • Add a Select Tilt Points mode that only shows tilt disks.

Toolbar with the new Select Tilt Points mode:
immagine

Select Points mode is cleaner (the only thing is missing is changing the color of the selected control points, eventually suggest in which part of the code this change should be made, I couldn't get it in a straightforward way):

2024-03-25-16-07-59.mp4

Select Control Points shows the secondary handles. This mode permits moving points freely. If you need to "drag out" the points from their default position, you have to press shift (the tooltip text explains that):

2024-03-25-16-08-25.mp4

Select Tilt Points is the new mode that shows the tilt disks and handles, decluttering the other modes and solving other issues (tilt handles and secondary handles where often in conflict):

2024-03-25-16-08-47.mp4

@AThousandShips AThousandShips added this to the 4.3 milestone Mar 24, 2024
@GreenCrowDev GreenCrowDev force-pushed the missing-bezier-handles branch 2 times, most recently from 625328b to 5861b52 Compare March 25, 2024 13:39
@GreenCrowDev GreenCrowDev marked this pull request as ready for review March 25, 2024 16:21
@GreenCrowDev GreenCrowDev requested review from a team as code owners March 25, 2024 16:21
@fire
Copy link
Member

fire commented Mar 25, 2024

I'm heading back from a convention, but I'll love to review in a few. Will try to find a few others.

@fire
Copy link
Member

fire commented Mar 25, 2024

@Calinou I'd really appreciate if you take a look?

Copy link
Member

@fire fire left a comment

Choose a reason for hiding this comment

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

I like the usability improvements for Path3D feature wise. I did not review the code at depth.

For example:

Split the two types of "extra" handles like shape and disc helps reduce the difficult in using Path3D. Also the shift idea sounds good.

There's a process for optimizing svg, but it can be done in a later pr. https://docs.godotengine.org/en/3.6/development/editor/creating_icons.html

@GreenCrowDev
Copy link
Contributor Author

I'm pretty sure I already optimized the SVG following that guide (could I have it done wrong?) 🤔
Thanks for the review!

Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

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

Tested locally (rebased on top of master 29b3d9e), it works as expected.

There are future improvements we could make (these usability issues also existed in master):

  • You can't drag a point relative to the current view in Select Points mode. You can only do that in Select Control Points or Select Tilt Handles modes.
  • You can't create a new handle out of a point by holding Shift then dragging a point in the Select Points mode. Again, this only works in the Select Control Points or Select Tilt Handles modes.

Both of the above could be implemented using a drag distance threshold, where dragging by 8 * EDSCALE pixels or more would be considered a dragging operation, and dragging a lower distance before releasing the mouse would be considered a selection operation.

  • Handle tilts could be displayed as degrees in the bottom-left corner when dragging one:

image

For reference, this is what the Node3D rotation gizmo message looks like:

image

@akien-mga akien-mga merged commit 8516304 into godotengine:master Apr 4, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks! And congrats for your first merged Godot contribution 🎉

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