From ba720030be454fa36bb4e43b59896ea3753bb585 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 6 Oct 2008 09:17:49 +0000 Subject: [PATCH] * dont change handle types when adjusting the radius or tilt of a curve handel. * dont take the handles into account for the manipulator center when they are not drawn. --- source/blender/src/transform_conversions.c | 5 ++++- source/blender/src/transform_manipulator.c | 13 +++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/source/blender/src/transform_conversions.c b/source/blender/src/transform_conversions.c index 5dadcc67a09..00937e893f1 100644 --- a/source/blender/src/transform_conversions.c +++ b/source/blender/src/transform_conversions.c @@ -1428,7 +1428,10 @@ static void createTransCurveVerts(TransInfo *t) if (propmode && head != tail) calc_distanceCurveVerts(head, tail-1); - testhandlesNurb(nu); /* sets the handles based on their selection, do this after the data is copied to the TransData */ + /* TODO - in the case of tilt and radius we can also avoid allocating the initTransDataCurveHandes + * but for now just dont change handle types */ + if (ELEM(t->mode, TFM_CURVE_SHRINKFATTEN, TFM_TILT) == 0) + testhandlesNurb(nu); /* sets the handles based on their selection, do this after the data is copied to the TransData */ } else { TransData *head, *tail; diff --git a/source/blender/src/transform_manipulator.c b/source/blender/src/transform_manipulator.c index 709879f142b..b5a5ecd05ce 100644 --- a/source/blender/src/transform_manipulator.c +++ b/source/blender/src/transform_manipulator.c @@ -282,8 +282,17 @@ int calc_manipulator_stats(ScrArea *sa) bezt= nu->bezt; a= nu->pntsu; while(a--) { - /* exception */ - if( (bezt->f1 & SELECT) + (bezt->f2 & SELECT) + (bezt->f3 & SELECT) > SELECT ) { + /* exceptions + * if handles are hidden then only check the center points. + * If 2 or more are selected then only use the center point too. + */ + if (G.f & G_HIDDENHANDLES) { + if (bezt->f2 & SELECT) { + calc_tw_center(bezt->vec[1]); + totsel++; + } + } + else if ( (bezt->f1 & SELECT) + (bezt->f2 & SELECT) + (bezt->f3 & SELECT) > SELECT ) { calc_tw_center(bezt->vec[1]); totsel++; }