Anim: run bezier handle calculation in parallel #119388

Merged
Christoph Lendenfeld merged 21 commits from ChrisLend/blender:thread_recalc_handles into main 2024-05-07 10:43:03 +02:00
1 changed files with 1 additions and 2 deletions
Showing only changes of commit 0d0085c764 - Show all commits

View File

@ -1263,8 +1263,7 @@ void BKE_fcurve_handles_recalc_ex(FCurve *fcu, eBezTriple_Flag handle_sel_flag)
BezTriple *last = &fcu->bezt[fcu->totvert - 1];
const bool cycle = BKE_fcurve_is_cyclic(fcu) && BEZT_IS_AUTOH(first) && BEZT_IS_AUTOH(last);
IndexRange bezt_range(0, fcu->totvert);
threading::parallel_for(bezt_range, 256, [&](const IndexRange range) {
threading::parallel_for(IndexRange(fcu->totvert), 256, [&](const IndexRange range) {
BezTriple tmp;

I'd just write threading::parallel_for(IndexRange(fcu->totvert),

I'd just write `threading::parallel_for(IndexRange(fcu->totvert), `
for (const int i : range) {
BezTriple *bezt = &fcu->bezt[i];