diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-10-22 13:07:19 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-10-22 13:07:19 +0400 |
commit | 5777c624a54c4d834ec755a92079b504f04035e8 (patch) | |
tree | 849650b13e6a82a59f480d6eb79c7dbd98a0a5b0 /source/blender/editors/animation/keyframes_edit.c | |
parent | c9092a6738d8f1dbf9fc76330d506771af4f90bb (diff) |
Animation Editors: Menu Tweaks
* Submenus displaying the options available for certain operators now will now show the hotkey for the operator on the menu entries.
* Added an option for mirroring keyframes in the Graph Editor which makes use of the new cursor
Diffstat (limited to 'source/blender/editors/animation/keyframes_edit.c')
-rw-r--r-- | source/blender/editors/animation/keyframes_edit.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c index 3b2830e9045..7373edb6841 100644 --- a/source/blender/editors/animation/keyframes_edit.c +++ b/source/blender/editors/animation/keyframes_edit.c @@ -669,6 +669,19 @@ static short mirror_bezier_marker(BeztEditData *bed, BezTriple *bezt) return 0; } +static short mirror_bezier_value(BeztEditData *bed, BezTriple *bezt) +{ + float diff; + + /* value to mirror over is stored in the custom data -> first float value slot */ + if (bezt->f2 & SELECT) { + diff= (bed->f1 - bezt->vec[1][1]); + bezt->vec[1][1]= (bed->f1 + diff); + } + + return 0; +} + /* Note: for markers case, need to set global vars (eww...) */ // calchandles_fcurve BeztEditFunc ANIM_editkeyframes_mirror(short type) @@ -682,6 +695,8 @@ BeztEditFunc ANIM_editkeyframes_mirror(short type) return mirror_bezier_xaxis; case MIRROR_KEYS_MARKER: /* mirror over marker */ return mirror_bezier_marker; + case MIRROR_KEYS_VALUE: /* mirror over given value */ + return mirror_bezier_value; default: /* just in case */ return mirror_bezier_yaxis; break; |