Merge branch 'blender-v4.2-release'

This commit is contained in:
Christoph Lendenfeld
2024-06-27 17:00:03 +02:00

View File

@@ -1111,22 +1111,14 @@ void fcurve_to_keylist(AnimData *adt,
BezTripleChain chain = {nullptr};
int start_index = 0;
/* Used in an exclusive way. */
int end_index = fcu->totvert;
bool replace;
start_index = BKE_fcurve_bezt_binarysearch_index(fcu->bezt, range[0], fcu->totvert, &replace);
if (start_index > 0) {
start_index--;
}
end_index = BKE_fcurve_bezt_binarysearch_index(fcu->bezt, range[1], fcu->totvert, &replace);
if (end_index < fcu->totvert) {
end_index++;
}
/* Loop through beztriples, making ActKeysColumns. */
for (int v = start_index; v < end_index; v++) {
for (int v = 0; v < fcu->totvert; v++) {
/* Not using binary search to limit the range because the FCurve might not be sorted e.g. when
* transforming in the Dope Sheet. */
const float x = fcu->bezt[v].vec[1][0];
if (x < range[0] || x > range[1]) {
continue;
}
chain.cur = &fcu->bezt[v];
/* Neighbor columns, accounting for being cyclic. */
@@ -1142,7 +1134,7 @@ void fcurve_to_keylist(AnimData *adt,
add_bezt_to_keycolumns_list(keylist, &chain);
}
update_keyblocks(keylist, &fcu->bezt[start_index], end_index - start_index);
update_keyblocks(keylist, &fcu->bezt[0], fcu->totvert);
if (adt) {
ANIM_nla_mapping_apply_fcurve(adt, fcu, true, false);