diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-09-29 09:03:21 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-09-29 09:03:21 +0400 |
commit | 5bbd0decfdbcb716064726b75949263a57b02d89 (patch) | |
tree | 658af0e44d5880026305b0e75d475ed1eaf5848d /source/blender/blenkernel/intern | |
parent | 45b74dcf2cd787841459ac7cb133ca6ecca83e19 (diff) |
fix [#28765] keyframe handles do not move with curves in graph editor when hidden, resulting in bad curves.
hide handles wasn't properly respected by transform function testhandles_fcurve().
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/fcurve.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index 3916d0ca701..8ea80ae9296 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -818,7 +818,7 @@ void calchandles_fcurve (FCurve *fcu) * -> Vector handles: become 'nothing' when (one half selected AND other not) * - PHASE 2: recalculate handles */ -void testhandles_fcurve (FCurve *fcu) +void testhandles_fcurve (FCurve *fcu, const short use_handle) { BezTriple *bezt; unsigned int a; @@ -834,9 +834,16 @@ void testhandles_fcurve (FCurve *fcu) /* flag is initialised as selection status * of beztriple control-points (labelled 0,1,2) */ - if (bezt->f1 & SELECT) flag |= (1<<0); // == 1 if (bezt->f2 & SELECT) flag |= (1<<1); // == 2 - if (bezt->f3 & SELECT) flag |= (1<<2); // == 4 + if(use_handle == FALSE) { + if(flag & 2) { + flag |= (1<<0) | (1<<2); + } + } + else { + if (bezt->f1 & SELECT) flag |= (1<<0); // == 1 + if (bezt->f3 & SELECT) flag |= (1<<2); // == 4 + } /* one or two handles selected only */ if (ELEM(flag, 0, 7)==0) { |