forked from bartvdbraak/blender
bugfix #3100
Hrms... previous commit here to make sure faces are not added 'double', caused a part in removedoubles not to work well, removing too many faces. Solved it more proper now.
This commit is contained in:
parent
94aa843626
commit
e5b9f62c6e
@ -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 */
|
||||
|
@ -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;
|
||||
|
@ -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(equal<test) return 0;
|
||||
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* this also prevents triangles being made in quads */
|
||||
@ -1407,7 +1407,7 @@ EditFace *exist_face(EditVert *v1, EditVert *v2, EditVert *v3, EditVert *v4)
|
||||
|
||||
efa= em->faces.first;
|
||||
while(efa) {
|
||||
if(compareface(&efatest, efa)) return efa;
|
||||
if(compareface(&efatest, efa, 3)) return efa;
|
||||
efa= efa->next;
|
||||
}
|
||||
return NULL;
|
||||
|
@ -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++;
|
||||
|
Loading…
Reference in New Issue
Block a user