2.5 - Keyframes can now be marked as 'extremes' in addition to 'breakdowns'
[blender.git] / source / blender / editors / animation / keyframes_edit.c
index ac04dc7d1a8ece09b75b602a7d01016dc7046f40..9666cb115b113de7edf89edf4b411ffeeba81359 100644 (file)
@@ -685,6 +685,13 @@ static short set_keytype_breakdown(BeztEditData *bed, BezTriple *bezt)
        return 0;
 }
 
+static short set_keytype_extreme(BeztEditData *bed, BezTriple *bezt) 
+{
+       if (bezt->f2 & SELECT) 
+               BEZKEYTYPE(bezt)= BEZT_KEYTYPE_EXTREME;
+       return 0;
+}
+
 /* Set the interpolation type of the selected BezTriples in each F-Curve to the specified one */
 BeztEditFunc ANIM_editkeyframes_keytype(short code)
 {
@@ -692,6 +699,9 @@ BeztEditFunc ANIM_editkeyframes_keytype(short code)
                case BEZT_KEYTYPE_BREAKDOWN: /* breakdown */
                        return set_keytype_breakdown;
                        
+               case BEZT_KEYTYPE_EXTREME: /* extreme keyframe */
+                       return set_keytype_extreme;
+                       
                case BEZT_KEYTYPE_KEYFRAME: /* proper keyframe */       
                default:
                        return set_keytype_keyframe;