Curve Tilt Tool Todo
- Add Tilt tool to Curve Edit toolbar
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Confirmed | DESIGN | Campbell Barton (campbellbarton) | T54844 Code Quest Tool System (Parent Task) | ||
| Confirmed | TO DO | Campbell Barton (campbellbarton) | T56571 Tools: Per-tool Todo List | ||
| Resolved | TO DO | Campbell Barton (campbellbarton) | T57224 Curve Tilt Tool Todo |
Hey, I tried to implement this tool to get more familiar with the tool system here: https://developer.blender.org/D3804
It does not really work as intended yet but I have questions.
Is there a mockup for how the gizmo (widget? I'm still confused) for this tool should look like?
Especially also when multiple points are selected.
What I have now looks like so:
(currently it's always visible when a point is select and not only when the tool is active)
That looks pretty good already, very useful, many thanks.
Only suggestion I can think of is perhaps to draw some sort of local Z axis pointing to the current tilt direction, to make it clearer to the user where it is currently facing.
If possible even two axis one for X and Y. Bonus points if these axis are actually capable of snapping to other geometry, for precise tilting.
@Jacques Lucke (JacquesLucke): That looks pretty awesome!
I had in fact not even imagined there would necessarily be a gizmo here, but what you've done looks great. Nicely done.
With multiple points selected, we should just do what we do elsewhere: place the gizmo in the center.
Yes, gizmo/widget/manipulator all refer to the same thing. It's confusing. We call them gizmos now ;)
@Duarte Farrajota Ramos (duarteframos):
hmm having an axis show in the direction of the current tilt is a bit harder. Not sure if this can be done in pure Python. Depends in the selected twist method I guess...
Snapping is probably even harder but we'll see :)
@William Reynish (billreynish):
How should this tool without a gizmo? Just some slider in the topbar or what?
I played a bit more with this thing. It now supports multiple selected points and different spline types.
@Jacques Lucke (JacquesLucke):
Well, not all active tools necessarily have to have a gizmo if it doesn't make sense. For example, all the drawing tools obviously don't have any. Also, for any tool that simply affects a single value rather than a transform along several axes, we also don't display a gizmo for those. See Extrude Along Normals, Bevel, Inset or Smooth for examples. For those, the user just drags in the viewport to change the value.
In this example, all you are manipulating is the tilt value. This can be affected simply by clicking and dragging in the viewport. While a gizmo is fun, it doesn't actually add all that much. The main benefit of your gizmo, is a clearer sense of rotation, which is very nice, although probably somewhat confusing when you have multiple points selected?
I hope that makes things a bit clearer.
Probably we could go with your gizmo here - but they usually don't make sense for most single-value type tools.
@William Reynish (billreynish):
I see, makes sense. Just have to figure out how to link the gizmo more to the tool, so that it is not visible when the tool is not active. I'll have to wait until the py api for that is ready :)
I also don't care too much if we don't use my code in the end, it was more an exercise to better understand how to create gizmos in Python at all.
@Jacques Lucke (JacquesLucke): I think your gizmo here could be useful, if it's reliable enough with multiple points selected. The main thing was just adding this tool in the first place - you gone above and beyond and made a nice looking gizmo too.