This commit removes the use of PolySpline for resampling curves and
replaces it with the length parameterization utility for that purpose.
That leaves only 5 remaining uses of the BKE_spline.hh header,
not including existing patches. I didn't test performance, but I
would expect the shrinking to be slightly faster because I reused
some arrays to avoid allocating them for every curve. I noted some
potential improvements in the "add curves" function.
Details
Details
Diff Detail
Diff Detail
- Repository
- rB Blender
Event Timeline
Comment Actions
Doesn't seem to work correctly currently. In master it works correctly.
| source/blender/geometry/intern/add_curves_on_mesh.cc | ||
|---|---|---|
| 220 | Could use some bigger inline buffer to avoid an allocation every time. | |
Comment Actions
Fix adding curves. I missed that "lookup evaluator factor" was used instead of "lookup evaluated length".
I also used an inline buffer of 32 for the arrays, that should cover most hair use cases.
Comment Actions
Looks good. However, I can make it crash when there are curves with a single point. (didn't check if the same issue exists in master)
To reproduce it, just click on the cube in the file below (triggers in assert in debug builds).
I don't have to look at the patch again when that is fixed.