Page MenuHome

Curve smooth respect cycles
AbandonedPublic

Authored by Campbell Barton (campbellbarton) on Mar 27 2014, 12:00 AM.

Diff Detail

Event Timeline

source/blender/editors/curve/editcurve.c
2473–2474
  • No need to set these for every x/y/z axis.
  • Theres no check for cyclic.
Campbell Barton (campbellbarton) requested changes to this revision.Mar 27 2014, 12:38 AM
Walid Shouman (walid) updated this revision to Unknown Object (????).Mar 27 2014, 12:42 AM
  • Removed ind_prev and ind_next out of dimensions' loop
  • Check cyclic before executing its behavior
source/blender/editors/curve/editcurve.c
2504

we could be a bit cryptic and make it for(bp = &nu->bp[bias], a = bias; a < nu->pntsu - bias; a++, bp++)
and only set bias = 0 or bias = 1 if cyclic flag was raised,

should you make it cryptic, or leave it very simple like that?

Why not make smoothing into a static function that takes prev & next points, and a factor to smooth by.

Then having 2 different for loops wont do much duplication.

Walid Shouman (walid) updated this revision to Unknown Object (????).Mar 27 2014, 1:20 AM
  • Use static functions to smooth upon neighboring points for each of the BezTriple and BPoint curve points
source/blender/editors/curve/editcurve.c
2442

ops, missed to change this one :/

Walid Shouman (walid) updated this revision to Unknown Object (????).Mar 27 2014, 1:34 AM
  • Adding a missing factor propagation

Committed with some cleanup rB7ff123ce5c08953a31f5728922be9d56c4ed850c

source/blender/editors/curve/editcurve.c
2429

Dont think this is needed - just BLI_assert(factor >= 0.0f && factor <= 1.0f)

2457

again, just remove.