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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-10-19 18:11:46 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-10-19 18:11:46 +0400
commit26249043e61376ad1ab997685684757bb77b9711 (patch)
tree5390d5fb4bfb33ce518ff8d4995b37412130afc8 /source
parentdc7e1037d42304282d58359116fa0e261037fff6 (diff)
bugfix [#24324] Wrong center for scaling Bezier Curve's handles
slight change to how transform calculates the center of each bezier handle selection. - selecting both handles but not the knot now uses the mid point between the 2, before it used the handle. - selecting 1 handle of a curve was still setting td->center to be the knot, now use the handles location only if its selected.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/transform/transform_conversions.c4
-rw-r--r--source/blender/editors/transform/transform_manipulator.c8
2 files changed, 4 insertions, 8 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 7e74d12941b..5b1813559bb 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -1403,7 +1403,7 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
) {
VECCOPY(td->iloc, bezt->vec[0]);
td->loc= bezt->vec[0];
- VECCOPY(td->center, bezt->vec[1]);
+ VECCOPY(td->center, bezt->vec[(hide_handles || bezt->f2 & SELECT) ? 1:0]);
if (hide_handles) {
if(bezt->f2 & SELECT) td->flag= TD_SELECTED;
else td->flag= 0;
@@ -1462,7 +1462,7 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
) {
VECCOPY(td->iloc, bezt->vec[2]);
td->loc= bezt->vec[2];
- VECCOPY(td->center, bezt->vec[1]);
+ VECCOPY(td->center, bezt->vec[(hide_handles || bezt->f2 & SELECT) ? 1:2]);
if (hide_handles) {
if(bezt->f2 & SELECT) td->flag= TD_SELECTED;
else td->flag= 0;
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c
index 030ad190dc3..f3afd5793bc 100644
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@ -308,7 +308,7 @@ int calc_manipulator_stats(const bContext *C)
while(a--) {
/* 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 the center knot is selected then only use this as the center point.
*/
if (cu->drawflag & CU_HIDE_HANDLES) {
if (bezt->f2 & SELECT) {
@@ -316,7 +316,7 @@ int calc_manipulator_stats(const bContext *C)
totsel++;
}
}
- else if ( (bezt->f1 & SELECT) + (bezt->f2 & SELECT) + (bezt->f3 & SELECT) > SELECT ) {
+ else if (bezt->f2 & SELECT) {
calc_tw_center(scene, bezt->vec[1]);
totsel++;
}
@@ -325,10 +325,6 @@ int calc_manipulator_stats(const bContext *C)
calc_tw_center(scene, bezt->vec[0]);
totsel++;
}
- if(bezt->f2) {
- calc_tw_center(scene, bezt->vec[1]);
- totsel++;
- }
if(bezt->f3) {
calc_tw_center(scene, bezt->vec[2]);
totsel++;