Cleanup: Remove unused function pose_propagate_fcurve

Remove the unused function `pose_propagate_fcurve`
It was missed in D16771

Reviewed By: Jacques Lucke
Differential Revision: https://developer.blender.org/D16937
Ref: D16937
This commit is contained in:
Christoph Lendenfeld 2023-01-12 13:03:55 +01:00
parent ed178f5ff5
commit c5f9bf95cd
1 changed files with 0 additions and 52 deletions

View File

@ -1842,58 +1842,6 @@ static void propagate_curve_values(ListBase /*tPChanFCurveLink*/ *pflinks,
}
}
/**
* Propagate just works along each F-Curve in turn.
*/
static void UNUSED_FUNCTION(pose_propagate_fcurve)(FCurve *fcu,
float start_frame,
const float end_frame)
{
/* Skip if no keyframes to edit. */
if ((fcu->bezt == NULL) || (fcu->totvert < 2)) {
return;
}
/* Find the reference value from bones directly, which means that the user
* doesn't need to firstly keyframe the pose (though this doesn't mean that
* they can't either). */
float refVal = evaluate_fcurve(fcu, start_frame);
/* Find the first keyframe to start propagating from:
* - if there's a keyframe on the current frame, we probably want to save this value there too
* since it may be as of yet un-keyed
* - if starting before the starting frame, don't touch the key, as it may have had some valid
* values
*/
bool keyExists;
const int match = BKE_fcurve_bezt_binarysearch_index(
fcu->bezt, start_frame, fcu->totvert, &keyExists);
int i;
if (fcu->bezt[match].vec[1][0] < start_frame) {
i = match + 1;
}
else {
i = match;
}
BezTriple *bezt;
for (bezt = &fcu->bezt[i]; i < fcu->totvert; i++, bezt++) {
/* Additional termination conditions based on the operator 'mode' property go here. */
/* Stop if keyframe is outside the accepted range. */
if (bezt->vec[1][0] > end_frame) {
break;
}
/* Just flatten handles, since values will now be the same either side. */
/* TODO: perhaps a fade-out modulation of the value is required here (optional once again)? */
bezt->vec[0][1] = bezt->vec[1][1] = bezt->vec[2][1] = refVal;
/* Select keyframe to indicate that it's been changed. */
bezt->f2 |= SELECT;
}
}
static float find_next_key(ListBase *pflinks, const float start_frame)
{
float target_frame = FLT_MAX;