diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-02-10 21:22:55 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-02-10 21:22:55 +0300 |
commit | ac45c743f881e14756faff747ec0e10a28477737 (patch) | |
tree | a7f241ce6e4083189a80182431d261d1f5e3fcf4 /source/blender/editors/transform | |
parent | 226fb2b37720c747dd8c4cd438d845439ed29edc (diff) |
realtime updates in the graph editor were updating all visible fcurves, update all selected fcurves instead.
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r-- | source/blender/editors/transform/transform_generics.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 2d32b81de33..12d413854c1 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -321,6 +321,18 @@ static void animrecord_check_state (Scene *scene, ID *id, wmTimer *animtimer) } } +static int fcu_test_selected(FCurve *fcu) +{ + BezTriple *bezt; + int i; + + for (i=0, bezt=fcu->bezt; i < fcu->totvert; i++, bezt++) { + if (BEZSELECTED(bezt)) return 1; + } + + return 0; +} + /* called for updating while transform acts, once per redraw */ void recalcData(TransInfo *t) { @@ -407,7 +419,11 @@ void recalcData(TransInfo *t) /* now test if there is a need to re-sort */ for (ale= anim_data.first; ale; ale= ale->next) { FCurve *fcu= (FCurve *)ale->key_data; - + + /* ignore unselected fcurves */ + if(!fcu_test_selected(fcu)) + continue; + // fixme: only do this for selected verts... ANIM_unit_mapping_apply_fcurve(ac.scene, ale->id, ale->key_data, ANIM_UNITCONV_ONLYSEL|ANIM_UNITCONV_SELVERTS|ANIM_UNITCONV_RESTORE); |