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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-02-26 12:02:52 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-02-26 12:02:52 +0300
commit9352c9f0c14aff78ad7c9eba980528bcb1be1575 (patch)
treeaee48e0e5fb34b2b5de31d2c1e327ad383d39ef6 /source/blender/editors/transform
parent2cf6141e7ca40daeaae845246ffa22258eefc579 (diff)
use negate_v3 rather then multiplying a vector by -1.0 (no functional changes)
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r--source/blender/editors/transform/transform.c6
-rw-r--r--source/blender/editors/transform/transform_orientations.c5
2 files changed, 4 insertions, 7 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 6013ff5f105..f19265679f9 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -2718,8 +2718,7 @@ void initRotation(TransInfo *t)
if (t->flag & T_2D_EDIT)
t->flag |= T_NO_CONSTRAINT;
- VECCOPY(t->axis, t->viewinv[2]);
- mul_v3_fl(t->axis, -1.0f);
+ negate_v3_v3(t->axis, t->viewinv[2]);
normalize_v3(t->axis);
}
@@ -2977,8 +2976,7 @@ int Rotation(TransInfo *t, short mval[2])
t->con.applyRot(t, NULL, t->axis, &final);
} else {
/* reset axis if constraint is not set */
- VECCOPY(t->axis, t->viewinv[2]);
- mul_v3_fl(t->axis, -1.0f);
+ negate_v3_v3(t->axis, t->viewinv[2]);
normalize_v3(t->axis);
}
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index 76df012565e..db7d31bae56 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -818,9 +818,8 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
quat_to_mat4( mat,ml_sel->quat);
VECCOPY(normal, mat[2]);
- VECCOPY(plane, mat[1]);
- mul_v3_fl(plane, -1.0);
+ negate_v3_v3(plane, mat[1]);
result = ORIENTATION_NORMAL;
}
@@ -888,7 +887,7 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
add_v3_v3v3(plane, plane, pchan->pose_mat[1]);
}
}
- mul_v3_fl(plane, -1.0);
+ negate_v3(plane);
/* we need the transpose of the inverse for a normal... */
copy_m3_m4(imat, ob->obmat);