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>2012-12-18 09:38:21 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-12-18 09:38:21 +0400
commit40a667e2ffcf772c65220debf19fa3926a4e4a01 (patch)
treef56ba49553cfa3fe4c6bed567b4d8396e4757015 /source/blender
parentdd68223c720c951b8e8f54a8664dab34270b985d (diff)
code cleanup
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/transform/transform_manipulator.c14
-rw-r--r--source/blender/editors/transform/transform_orientations.c4
2 files changed, 12 insertions, 6 deletions
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c
index 80c67cb3f4c..50f753390bd 100644
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@ -552,8 +552,9 @@ int calc_manipulator_stats(const bContext *C)
switch (v3d->twmode) {
case V3D_MANIP_GLOBAL:
+ {
break; /* nothing to do */
-
+ }
case V3D_MANIP_GIMBAL:
{
float mat[3][3];
@@ -562,16 +563,21 @@ int calc_manipulator_stats(const bContext *C)
break;
}
/* if not gimbal, fall through to normal */
+ /* pass through */
}
case V3D_MANIP_NORMAL:
+ {
if (obedit || ob->mode & OB_MODE_POSE) {
float mat[3][3];
ED_getTransformOrientationMatrix(C, mat, (v3d->around == V3D_ACTIVE));
copy_m4_m3(rv3d->twmat, mat);
break;
}
- /* no break we define 'normal' as 'local' in Object mode */
+ /* no break we define 'normal' as 'local' in Object mode */
+ /* pass through */
+ }
case V3D_MANIP_LOCAL:
+ {
if (ob->mode & OB_MODE_POSE) {
/* each bone moves on its own local axis, but to avoid confusion,
* use the active pones axis for display [#33575], this works as expected on a single bone
@@ -585,15 +591,15 @@ int calc_manipulator_stats(const bContext *C)
copy_m4_m4(rv3d->twmat, ob->obmat);
normalize_m4(rv3d->twmat);
break;
-
+ }
case V3D_MANIP_VIEW:
{
float mat[3][3];
copy_m3_m4(mat, rv3d->viewinv);
normalize_m3(mat);
copy_m4_m3(rv3d->twmat, mat);
+ break;
}
- break;
default: /* V3D_MANIP_CUSTOM */
{
float mat[3][3];
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index e865680ebd3..1f0fcbcde5a 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -738,7 +738,7 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
}
}
- if (normal[0] != 0 || normal[1] != 0 || normal[2] != 0) {
+ if (!is_zero_v3(normal)) {
result = ORIENTATION_NORMAL;
}
}
@@ -780,7 +780,7 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
normalize_v3(normal);
normalize_v3(plane);
- if (plane[0] != 0 || plane[1] != 0 || plane[2] != 0) {
+ if (!is_zero_v3(plane)) {
result = ORIENTATION_EDGE;
}