diff options
Diffstat (limited to 'source/blender/editors/animation/keyframes_edit.c')
-rw-r--r-- | source/blender/editors/animation/keyframes_edit.c | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c index 77826eca87a..ac04dc7d1a8 100644 --- a/source/blender/editors/animation/keyframes_edit.c +++ b/source/blender/editors/animation/keyframes_edit.c @@ -655,7 +655,7 @@ static short set_bezt_bezier(BeztEditData *bed, BezTriple *bezt) return 0; } -/* Set the interpolation type of the selected BezTriples in each IPO curve to the specified one */ +/* Set the interpolation type of the selected BezTriples in each F-Curve to the specified one */ // ANIM_editkeyframes_ipocurve_ipotype() ! BeztEditFunc ANIM_editkeyframes_ipo(short code) { @@ -669,6 +669,35 @@ BeztEditFunc ANIM_editkeyframes_ipo(short code) } } +/* ------- */ + +static short set_keytype_keyframe(BeztEditData *bed, BezTriple *bezt) +{ + if (bezt->f2 & SELECT) + BEZKEYTYPE(bezt)= BEZT_KEYTYPE_KEYFRAME; + return 0; +} + +static short set_keytype_breakdown(BeztEditData *bed, BezTriple *bezt) +{ + if (bezt->f2 & SELECT) + BEZKEYTYPE(bezt)= BEZT_KEYTYPE_BREAKDOWN; + return 0; +} + +/* Set the interpolation type of the selected BezTriples in each F-Curve to the specified one */ +BeztEditFunc ANIM_editkeyframes_keytype(short code) +{ + switch (code) { + case BEZT_KEYTYPE_BREAKDOWN: /* breakdown */ + return set_keytype_breakdown; + + case BEZT_KEYTYPE_KEYFRAME: /* proper keyframe */ + default: + return set_keytype_keyframe; + } +} + /* ******************************************* */ /* Selection */ |