diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-11-27 21:10:30 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-11-27 21:10:30 +0300 |
commit | 3d3f82a8df8cd0ec0ac873e1a56a7dc7c4751ba9 (patch) | |
tree | 9547167f08c1676d58a06e00b050412ad4823e70 /source/blender/editors/transform | |
parent | ef8b0043f54488a59fb7df65c76bc68e0e713899 (diff) |
Transform: fix for fcurve transform crash
counting handles was out of sync, now use exact same logic.
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 32 |
1 files changed, 9 insertions, 23 deletions
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++; } } } |