diff options
author | Ton Roosendaal <ton@blender.org> | 2005-09-24 19:36:25 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2005-09-24 19:36:25 +0400 |
commit | e5b9f62c6e82d4b7ab0d205cf0a8bb4ef8b90c52 (patch) | |
tree | 1d0db00ba2312d99fb3642fd6f8b10db62ec353b /source/blender/src/editmesh_lib.c | |
parent | 94aa84362604cbf421fa12bafa3472cc46aff049 (diff) |
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.
Diffstat (limited to 'source/blender/src/editmesh_lib.c')
-rw-r--r-- | source/blender/src/editmesh_lib.c | 10 |
1 files changed, 5 insertions, 5 deletions
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(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; |