Page MenuHome

Curves: Expose resample operator in sculpt mode
Changes PlannedPublic

Authored by Hans Goudey (HooglyBoogly) on May 6 2022, 11:18 AM.

Details

Summary

This commit moves the code for the resample curves node to the
geometry module, to allow reusing it in any editor. The same options
are available, accessible with the ctrl-R shortcut like mesh sculpt
mode.

TODO:

  • Add an option to avoid changing the curve type. Needs some of the same structure as D14769.

Diff Detail

Repository
rB Blender

Event Timeline

Hans Goudey (HooglyBoogly) requested review of this revision.May 6 2022, 11:18 AM
Hans Goudey (HooglyBoogly) created this revision.
Jacques Lucke (JacquesLucke) requested changes to this revision.May 6 2022, 12:04 PM

Currently, the curves are always converted to a poly spline, but we don't want to change the curve type (especially for the hair use case).

source/blender/blenkernel/BKE_curves.hh
674

Take parameter by value if the intention is to take ownership.

source/blender/geometry/GEO_resample_curves.hh
21

count_field

30

segment_length_field

This revision now requires changes to proceed.May 6 2022, 12:04 PM
Hans Goudey (HooglyBoogly) marked 3 inline comments as done.

In order to separate moving the code from changing it, maybe keeping the existing curve type could be handled as a separate patch.

  • Remove shortcut for now
  • Add "_field" to variable names
  • Take parameter by value

Can you maybe commit everything except for the operator first, and then you fix up the operator to keep the curve type intact?

Hans Goudey (HooglyBoogly) planned changes to this revision.May 10 2022, 9:42 AM

Supporting an option to keep the type intact will require some refactoring of this code. It will probably look a bit more like the changes in D14769, so I might finish that first.

Merge master, small changes

Hans Goudey (HooglyBoogly) planned changes to this revision.May 13 2022, 11:44 AM
Hans Goudey (HooglyBoogly) edited the summary of this revision. (Show Details)