diff options
-rw-r--r-- | source/blender/editors/animation/keyframes_draw.c | 9 | ||||
-rw-r--r-- | source/blender/editors/animation/keyframes_edit.c | 10 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_curve_types.h | 3 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_fcurve.c | 1 |
4 files changed, 21 insertions, 2 deletions
diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c index 12c4baaaa87..c1958064431 100644 --- a/source/blender/editors/animation/keyframes_draw.c +++ b/source/blender/editors/animation/keyframes_draw.c @@ -502,11 +502,18 @@ void draw_keyframe_shape (float x, float y, float xscale, float hsize, short sel case BEZT_KEYTYPE_EXTREME: /* redish frames for now */ { - if (sel) glColor4f(95.0f, 0.5f, 0.5f, alpha); + if (sel) glColor4f(0.95f, 0.5f, 0.5f, alpha); else glColor4f(0.91f, 0.70f, 0.80f, alpha); } break; + case BEZT_KEYTYPE_JITTER: /* greenish frames for now? */ + { + if (sel) glColor4f(0.38f, 0.75f, 0.26f, alpha); + else glColor4f(0.58f, 0.90f, 0.46f, alpha); + } + break; + case BEZT_KEYTYPE_KEYFRAME: /* traditional yellowish frames for now */ default: { diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c index 0a21dfcb43f..e9a2c1bdc06 100644 --- a/source/blender/editors/animation/keyframes_edit.c +++ b/source/blender/editors/animation/keyframes_edit.c @@ -995,6 +995,13 @@ static short set_keytype_extreme(KeyframeEditData *UNUSED(ked), BezTriple *bezt) return 0; } +static short set_keytype_jitter(KeyframeEditData *UNUSED(ked), BezTriple *bezt) +{ + if (bezt->f2 & SELECT) + BEZKEYTYPE(bezt)= BEZT_KEYTYPE_JITTER; + return 0; +} + /* Set the interpolation type of the selected BezTriples in each F-Curve to the specified one */ KeyframeEditFunc ANIM_editkeyframes_keytype(short code) { @@ -1005,6 +1012,9 @@ KeyframeEditFunc ANIM_editkeyframes_keytype(short code) case BEZT_KEYTYPE_EXTREME: /* extreme keyframe */ return set_keytype_extreme; + case BEZT_KEYTYPE_JITTER: /* jitter keyframe */ + return set_keytype_jitter; + case BEZT_KEYTYPE_KEYFRAME: /* proper keyframe */ default: return set_keytype_keyframe; diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h index 08d5258f34b..d66246a4136 100644 --- a/source/blender/makesdna/DNA_curve_types.h +++ b/source/blender/makesdna/DNA_curve_types.h @@ -328,7 +328,8 @@ typedef enum eBezTriple_Interpolation { typedef enum eBezTriple_KeyframeType { BEZT_KEYTYPE_KEYFRAME = 0, /* default - 'proper' Keyframe */ BEZT_KEYTYPE_EXTREME, /* 'extreme' keyframe */ - BEZT_KEYTYPE_BREAKDOWN /* 'breakdown' keyframe */ + BEZT_KEYTYPE_BREAKDOWN, /* 'breakdown' keyframe */ + BEZT_KEYTYPE_JITTER, /* 'jitter' keyframe (for adding 'filler' secondary motion) */ } eBezTriple_KeyframeType; /* checks if the given BezTriple is selected */ diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c index 606dee0aa8b..69e15482bbb 100644 --- a/source/blender/makesrna/intern/rna_fcurve.c +++ b/source/blender/makesrna/intern/rna_fcurve.c @@ -62,6 +62,7 @@ EnumPropertyItem beztriple_keyframe_type_items[] = { {BEZT_KEYTYPE_KEYFRAME, "KEYFRAME", 0, "Keyframe", ""}, {BEZT_KEYTYPE_BREAKDOWN, "BREAKDOWN", 0, "Breakdown", ""}, {BEZT_KEYTYPE_EXTREME, "EXTREME", 0, "Extreme", ""}, + {BEZT_KEYTYPE_JITTER, "JITTER", 0, "Jitter", ""}, {0, NULL, 0, NULL, NULL}}; #ifdef RNA_RUNTIME |