Partial Fix T44997: Propagate pose on selected keyframes only included those after the current frame

This behaviour was confusing, since "selected keyframes" suggests that it covers
all selected keyframes (instead of trying to do this based on frame ranges).
This commit is contained in:
Joshua Leung 2015-06-17 01:35:01 +12:00 committed by Sergey Sharybin
parent 7db9a7e518
commit f751e7dc77
Notes: blender-bot 2023-02-14 09:01:35 +01:00
Referenced by issue #44997, Propagate on selected keyframes
1 changed files with 13 additions and 6 deletions

View File

@ -1173,13 +1173,20 @@ static void pose_propagate_fcurve(wmOperator *op, Object *ob, FCurve *fcu,
* since it may be as of yet unkeyed
* - if starting before the starting frame, don't touch the key, as it may have had some valid
* values
* - if only doing selected keyframes, start from the first one
*/
match = binarysearch_bezt_index(fcu->bezt, startFrame, fcu->totvert, &keyExists);
if (fcu->bezt[match].vec[1][0] < startFrame)
i = match + 1;
else
i = match;
if (mode != POSE_PROPAGATE_SELECTED_KEYS) {
match = binarysearch_bezt_index(fcu->bezt, startFrame, fcu->totvert, &keyExists);
if (fcu->bezt[match].vec[1][0] < startFrame)
i = match + 1;
else
i = match;
}
else {
/* selected - start from first keyframe */
i = 0;
}
for (bezt = &fcu->bezt[i]; i < fcu->totvert; i++, bezt++) {
/* additional termination conditions based on the operator 'mode' property go here... */