[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13962] trunk/blender/source/blender/src/ transform_orientations.c: [#8434] Normal manipultor does not align with normals (like in 2.45)

Martin Poirier theeth at yahoo.com
Mon Mar 3 20:57:48 CET 2008


Revision: 13962
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=13962
Author:   theeth
Date:     2008-03-03 20:57:48 +0100 (Mon, 03 Mar 2008)

Log Message:
-----------
[#8434] Normal manipultor does not align with normals (like in 2.45)

Bring back multivert normal average for the normal manipulator/orientation.

When selecting more than three vertice, the averaged normal of all selected is used to get orientation Z-axis.

NOTE: This is only applicable when NO faces are selected, otherwise it uses the averaged normal of the faces (excluding vertice that aren't part of a face). This is not new behavior

CHANGES FROM 2.45: Selecting 2 or 3 vertice doesn't use normal averaging but uses virtual edge and face orientations instead.

Modified Paths:
--------------
    trunk/blender/source/blender/src/transform_orientations.c

Modified: trunk/blender/source/blender/src/transform_orientations.c
===================================================================
--- trunk/blender/source/blender/src/transform_orientations.c	2008-03-03 19:02:01 UTC (rev 13961)
+++ trunk/blender/source/blender/src/transform_orientations.c	2008-03-03 19:57:48 UTC (rev 13962)
@@ -509,6 +509,19 @@
 					}
 					result = ORIENTATION_VERT;
 				}
+				else if (G.totvertsel > 3)
+				{
+					normal[0] = normal[1] = normal[2] = 0;
+					
+					for (eve = em->verts.first; eve; eve = eve->next)
+					{
+						if ( eve->f & SELECT ) {
+							VecAddf(normal, normal, eve->no);
+						}
+					}
+					Normalize(normal);
+					result = ORIENTATION_VERT;
+				}
 			}
 		} /* end editmesh */
 		else if ELEM3(G.obedit->type, OB_CURVE, OB_SURF, OB_FONT)





More information about the Bf-blender-cvs mailing list