Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-09-29 09:03:21 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-09-29 09:03:21 +0400
commit5bbd0decfdbcb716064726b75949263a57b02d89 (patch)
tree658af0e44d5880026305b0e75d475ed1eaf5848d /source/blender/blenkernel
parent45b74dcf2cd787841459ac7cb133ca6ecca83e19 (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')
-rw-r--r--source/blender/blenkernel/BKE_fcurve.h2
-rw-r--r--source/blender/blenkernel/intern/fcurve.c13
2 files changed, 11 insertions, 4 deletions
diff --git a/source/blender/blenkernel/BKE_fcurve.h b/source/blender/blenkernel/BKE_fcurve.h
index 244fda33a52..08798a6ddf0 100644
--- a/source/blender/blenkernel/BKE_fcurve.h
+++ b/source/blender/blenkernel/BKE_fcurve.h
@@ -231,7 +231,7 @@ short fcurve_is_keyframable(struct FCurve *fcu);
/* -------- Curve Sanity -------- */
void calchandles_fcurve(struct FCurve *fcu);
-void testhandles_fcurve(struct FCurve *fcu);
+void testhandles_fcurve(struct FCurve *fcu, const short use_handle);
void sort_time_fcurve(struct FCurve *fcu);
short test_time_fcurve(struct FCurve *fcu);
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) {