Only selected keys will get cleaned by the action and graph clean
operators
This commit is contained in:
@@ -199,6 +199,10 @@ void clean_fcurve(FCurve *fcu, float thresh)
|
|||||||
/* now insert first keyframe, as it should be ok */
|
/* now insert first keyframe, as it should be ok */
|
||||||
bezt = old_bezts;
|
bezt = old_bezts;
|
||||||
insert_vert_fcurve(fcu, bezt->vec[1][0], bezt->vec[1][1], 0);
|
insert_vert_fcurve(fcu, bezt->vec[1][0], bezt->vec[1][1], 0);
|
||||||
|
if (!(bezt->f2 & SELECT)) {
|
||||||
|
lastb = fcu->bezt;
|
||||||
|
lastb->f1 = lastb->f2 = lastb->f3 = 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* Loop through BezTriples, comparing them. Skip any that do
|
/* Loop through BezTriples, comparing them. Skip any that do
|
||||||
* not fit the criteria for "ok" points.
|
* not fit the criteria for "ok" points.
|
||||||
@@ -222,6 +226,13 @@ void clean_fcurve(FCurve *fcu, float thresh)
|
|||||||
prev[0] = lastb->vec[1][0]; prev[1] = lastb->vec[1][1];
|
prev[0] = lastb->vec[1][0]; prev[1] = lastb->vec[1][1];
|
||||||
cur[0] = bezt->vec[1][0]; cur[1] = bezt->vec[1][1];
|
cur[0] = bezt->vec[1][0]; cur[1] = bezt->vec[1][1];
|
||||||
|
|
||||||
|
if (!(bezt->f2 & SELECT)) {
|
||||||
|
insert_vert_fcurve(fcu, cur[0], cur[1], 0);
|
||||||
|
lastb = (fcu->bezt + (fcu->totvert - 1));
|
||||||
|
lastb->f1 = lastb->f2 = lastb->f3 = 0;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
/* check if current bezt occurs at same time as last ok */
|
/* check if current bezt occurs at same time as last ok */
|
||||||
if (IS_EQT(cur[0], prev[0], thresh)) {
|
if (IS_EQT(cur[0], prev[0], thresh)) {
|
||||||
/* If there is a next beztriple, and if occurs at the same time, only insert
|
/* If there is a next beztriple, and if occurs at the same time, only insert
|
||||||
|
Reference in New Issue
Block a user