diff --git a/source/blender/include/editmesh.h b/source/blender/include/editmesh.h index b9827e8af54..091d256808a 100644 --- a/source/blender/include/editmesh.h +++ b/source/blender/include/editmesh.h @@ -70,7 +70,7 @@ extern int faceselectedAND(EditFace *efa, int flag); extern EditFace *exist_face(EditVert *v1, EditVert *v2, EditVert *v3, EditVert *v4); extern void flipface(EditFace *efa); // flips for normal direction -extern int compareface(EditFace *vl1, EditFace *vl2); +extern int compareface(EditFace *vl1, EditFace *vl2, int test); /* flag for selection bits, *nor will be filled with normal for extrusion constraint */ /* return value defines if such normal was set */ diff --git a/source/blender/src/butspace.c b/source/blender/src/butspace.c index ca62281c4e5..5e32a41acbf 100644 --- a/source/blender/src/butspace.c +++ b/source/blender/src/butspace.c @@ -425,9 +425,9 @@ void drawbutspace(ScrArea *sa, void *spacedata) case CONTEXT_OBJECT: tab= sbuts->tab[CONTEXT_OBJECT]; - if(tab==sbuts->tab[TAB_OBJECT_OBJECT]) + if(tab==TAB_OBJECT_OBJECT) object_panels(); - else if(tab==sbuts->tab[TAB_OBJECT_PHYSICS]) + else if(tab==TAB_OBJECT_PHYSICS) physics_panels(); break; diff --git a/source/blender/src/editmesh_lib.c b/source/blender/src/editmesh_lib.c index 0375533ccb3..f00a5adc50e 100644 --- a/source/blender/src/editmesh_lib.c +++ b/source/blender/src/editmesh_lib.c @@ -1373,8 +1373,8 @@ void recalc_editnormals(void) } -/* this also prevents triangles being made in quads */ -int compareface(EditFace *vl1, EditFace *vl2) +/* this also allows to prevent triangles being made in quads */ +int compareface(EditFace *vl1, EditFace *vl2, int test) { EditVert *v1, *v2, *v3, *v4; int equal= 0; @@ -1389,9 +1389,9 @@ int compareface(EditFace *vl1, EditFace *vl2) if(vl1->v1==v3 || vl1->v2==v3 || vl1->v3==v3 || vl1->v4==v3) equal++; if(vl1->v1==v4 || vl1->v2==v4 || vl1->v3==v4 || vl1->v4==v4) equal++; - if(equal>2) return 1; + if(equalfaces.first; while(efa) { - if(compareface(&efatest, efa)) return efa; + if(compareface(&efatest, efa, 3)) return efa; efa= efa->next; } return NULL; diff --git a/source/blender/src/editmesh_tools.c b/source/blender/src/editmesh_tools.c index eff40c3c476..0e11351c8df 100644 --- a/source/blender/src/editmesh_tools.c +++ b/source/blender/src/editmesh_tools.c @@ -414,7 +414,7 @@ int removedoublesflag(short flag, float limit) /* return amount */ /* second test: is test permitted? */ efa= vsb1->efa; if( (efa->f1 & 128)==0 ) { - if( compareface(efa, vsb->efa)) efa->f1 |= 128; + if( compareface(efa, vsb->efa, 4)) efa->f1 |= 128; } vsb1++;