From 3d3f82a8df8cd0ec0ac873e1a56a7dc7c4751ba9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 27 Nov 2014 19:10:30 +0100 Subject: Transform: fix for fcurve transform crash counting handles was out of sync, now use exact same logic. --- .../editors/transform/transform_conversions.c | 32 ++++++---------------- 1 file changed, 9 insertions(+), 23 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 15876baad13..72a2fef3bc2 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -3824,33 +3824,19 @@ static void createTransGraphEditData(bContext *C, TransInfo *t) const bool sel1 = use_handle ? bezt->f1 & SELECT : sel2; const bool sel3 = use_handle ? bezt->f3 & SELECT : sel2; - if (is_translation_mode) { - /* for 'normal' pivots - just include anything that is selected. - * this works a bit differently in translation modes */ - if (sel2) { + if (!is_translation_mode || !(sel2)) { + if (sel1) { count++; } - else { - if (sel1) count++; - if (sel3) count++; - } - } - else if (use_local_center) { - /* for local-pivot we only need to count the number of selected handles only, - * so that centerpoints don't get moved wrong - */ - if (bezt->ipo == BEZT_IPO_BEZ) { - if (sel1) count++; - if (sel3) count++; + + if (sel3) { + count++; } - /* else if (sel2) count++; // TODO: could this cause problems? */ - /* - yes this causes problems, because no td is created for the center point */ } - else { - /* for 'normal' pivots - just include anything that is selected */ - if (sel1) count++; - if (sel2) count++; - if (sel3) count++; + + /* only include main vert if selected */ + if (sel2 && !use_local_center) { + count++; } } } -- cgit v1.2.3