Anim: run bezier handle calculation in parallel #119388
|
@ -1239,7 +1239,7 @@ void BKE_fcurve_handles_recalc_ex(FCurve *fcu, eBezTriple_Flag handle_sel_flag)
|
|||
const bool cycle = BKE_fcurve_is_cyclic(fcu) && BEZT_IS_AUTOH(first) && BEZT_IS_AUTOH(last);
|
||||
|
||||
blender::IndexRange bezt_range(0, fcu->totvert);
|
||||
blender::threading::parallel_for(bezt_range, 128, [&](const blender::IndexRange range) {
|
||||
blender::threading::parallel_for(bezt_range, 512, [&](const blender::IndexRange range) {
|
||||
for (const int i : range) {
|
||||
BezTriple *bezt = &fcu->bezt[i];
|
||||
|
||||
BezTriple *prev = nullptr;
|
||||
|
|
Loading…
Reference in New Issue
How about pulling the special handling for the first and last keyframes out of the parallel loop, and skipping those two indices?
bezt_range.drop_front(1).drop_back(1)
To do that without duplicating the code within the loop I'd need to extract the logic into a function. Should I do this within this PR?
Definitely not a big deal either way, it could wait if you preferred!