- New feature: shift+ctrl+t in Mesh editmode splits quads in exact opposite

way. Requested for low-poly modeling.

- fix: on exit editmode, the code always created a mesh->dvert block...
  silly, this made other code confused which decided whether to use
  dverts (vertex groups) or not.

- removed obsolete call from armature.c. Also fixed name of function there,
  preparation work for nicer support in Blender for "deform envelopes"
This commit is contained in:
2005-08-17 13:26:42 +00:00
parent 55b5abe2c9
commit 2872263377
8 changed files with 34 additions and 58 deletions

View File

@@ -136,18 +136,21 @@ static int vergface(const void *v1, const void *v2)
/* *********************************** */
void convert_to_triface(int all)
void convert_to_triface(int direction)
{
EditMesh *em = G.editMesh;
EditFace *efa, *efan, *next;
float fac;
efa= em->faces.last;
while(efa) {
next= efa->prev;
if(efa->v4) {
if(all || (efa->f & SELECT) ) {
if(efa->f & SELECT) {
/* choose shortest diagonal for split */
if(VecLenf(efa->v1->co, efa->v3->co) <= VecLenf(efa->v2->co, efa->v4->co)) {
fac= VecLenf(efa->v1->co, efa->v3->co) - VecLenf(efa->v2->co, efa->v4->co);
/* this makes sure exact squares get split different in both cases */
if( (direction==0 && fac<FLT_EPSILON) || (direction && fac>0.0f) ) {
efan= addfacelist(efa->v1, efa->v2, efa->v3, 0, efa, NULL);
if(efa->f & SELECT) EM_select_face(efan, 1);