forked from bartvdbraak/blender
[#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.
This commit is contained in:
parent
156d246462
commit
1e5f4144b9
@ -509,6 +509,19 @@ int getTransformOrientation(float normal[3], float plane[3], int activeOnly)
|
||||
}
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user