[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [53103] trunk/blender/source/blender/ editors/transform: code cleanup

Campbell Barton ideasman42 at gmail.com
Tue Dec 18 06:38:27 CET 2012


Revision: 53103
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=53103
Author:   campbellbarton
Date:     2012-12-18 05:38:21 +0000 (Tue, 18 Dec 2012)
Log Message:
-----------
code cleanup

Modified Paths:
--------------
    trunk/blender/source/blender/editors/transform/transform_manipulator.c
    trunk/blender/source/blender/editors/transform/transform_orientations.c

Modified: trunk/blender/source/blender/editors/transform/transform_manipulator.c
===================================================================
--- trunk/blender/source/blender/editors/transform/transform_manipulator.c	2012-12-18 05:29:56 UTC (rev 53102)
+++ trunk/blender/source/blender/editors/transform/transform_manipulator.c	2012-12-18 05:38:21 UTC (rev 53103)
@@ -552,8 +552,9 @@
 		switch (v3d->twmode) {
 		
 			case V3D_MANIP_GLOBAL:
+			{
 				break; /* nothing to do */
-
+			}
 			case V3D_MANIP_GIMBAL:
 			{
 				float mat[3][3];
@@ -562,16 +563,21 @@
 					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 @@
 				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];

Modified: trunk/blender/source/blender/editors/transform/transform_orientations.c
===================================================================
--- trunk/blender/source/blender/editors/transform/transform_orientations.c	2012-12-18 05:29:56 UTC (rev 53102)
+++ trunk/blender/source/blender/editors/transform/transform_orientations.c	2012-12-18 05:38:21 UTC (rev 53103)
@@ -738,7 +738,7 @@
 				}
 			}
 			
-			if (normal[0] != 0 || normal[1] != 0 || normal[2] != 0) {
+			if (!is_zero_v3(normal)) {
 				result = ORIENTATION_NORMAL;
 			}
 		}
@@ -780,7 +780,7 @@
 			normalize_v3(normal);
 			normalize_v3(plane);
 
-			if (plane[0] != 0 || plane[1] != 0 || plane[2] != 0) {
+			if (!is_zero_v3(plane)) {
 				result = ORIENTATION_EDGE;
 			}
 




More information about the Bf-blender-cvs mailing list