Page MenuHome

Curves: Use only current brush location for delete brush
ClosedPublic

Authored by Hans Goudey (HooglyBoogly) on May 20 2022, 10:51 AM.

Details

Summary

Currently the delete brush and some other brushes use the line
segment from the current brush position to the previous position
to find curves to interact with. However, this doesn't work well
with more advanced stroke settings that purposefully use
non-contiguous brush sample locations. This commit makes
the delete brush only use the current sample location.

Diff Detail

Repository
rB Blender

Event Timeline

Hans Goudey (HooglyBoogly) requested review of this revision.May 20 2022, 10:51 AM
Hans Goudey (HooglyBoogly) created this revision.
Jacques Lucke (JacquesLucke) requested changes to this revision.May 20 2022, 12:37 PM
Jacques Lucke (JacquesLucke) added inline comments.
source/blender/editors/sculpt_paint/curves_sculpt_delete.cc
171–173

Why is this using the 3d version of the function?

This revision now requires changes to proceed.May 20 2022, 12:37 PM
source/blender/editors/sculpt_paint/curves_sculpt_delete.cc
171–173

Copy and paste, oops..

What do you think about having a BLI_math_geom.hh with distance_to_line_segment_sq(const T &segment_b, const T &segment_b, const T &point);? Should eliminate this mistake completely and work more nicely with C++ code.

source/blender/editors/sculpt_paint/curves_sculpt_delete.cc
171–173

That can be done separately. And I'd like to see a more clear plan for the naming of these functions.
I worked on this a bit a while ago but remember that it wasn't super straight forward to make a nice api, especially when there are multiple return values.

  • Fix; Use 2D function for region space
This revision is now accepted and ready to land.May 20 2022, 1:10 PM