Breakdown Implementation
This patch adds the breakdown (or tween) functionality to the graph editor. The factor defines the linear interpolation from left key to right key. Reviewed by: Sybren A. Stüvel Differential Revision: https://developer.blender.org/D9375 Ref: D9375
This commit is contained in:
@@ -400,6 +400,18 @@ void blend_to_neighbor_fcurve_segment(FCurve *fcu, FCurveSegment *segment, const
|
||||
|
||||
/* ---------------- */
|
||||
|
||||
void breakdown_fcurve_segment(FCurve *fcu, FCurveSegment *segment, const float factor)
|
||||
{
|
||||
BezTriple left_bezt = fcurve_segment_start_get(fcu, segment->start_index);
|
||||
BezTriple right_bezt = fcurve_segment_end_get(fcu, segment->start_index + segment->length);
|
||||
|
||||
for (int i = segment->start_index; i < segment->start_index + segment->length; i++) {
|
||||
fcu->bezt[i].vec[1][1] = interpf(right_bezt.vec[1][1], left_bezt.vec[1][1], factor);
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------------- */
|
||||
|
||||
/* Check if the keyframe interpolation type is supported */
|
||||
static bool prepare_for_decimate(FCurve *fcu, int i)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user