[Bf-blender-cvs] [c5f9bf95cdc] master: Cleanup: Remove unused function pose_propagate_fcurve

Christoph Lendenfeld noreply at git.blender.org
Thu Jan 12 13:06:13 CET 2023


Commit: c5f9bf95cdc1d6a3eb2593b4b3ed2560602a4b8f
Author: Christoph Lendenfeld
Date:   Thu Jan 12 13:03:55 2023 +0100
Branches: master
https://developer.blender.org/rBc5f9bf95cdc1d6a3eb2593b4b3ed2560602a4b8f

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

===================================================================

M	source/blender/editors/armature/pose_slide.c

===================================================================

diff --git a/source/blender/editors/armature/pose_slide.c b/source/blender/editors/armature/pose_slide.c
index 86675a1bef2..38762913b3d 100644
--- a/source/blender/editors/armature/pose_slide.c
+++ b/source/blender/editors/armature/pose_slide.c
@@ -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;



More information about the Bf-blender-cvs mailing list