Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2005-09-24 19:46:08 +0400
committerTon Roosendaal <ton@blender.org>2005-09-24 19:46:08 +0400
commit843bc28d37fa32889671ee7ae6ffb71190b4f890 (patch)
treeea5f478e58784c17e80851e8ca3c0c32ad04df84 /source/blender/src/editmesh_add.c
parente5b9f62c6e82d4b7ab0d205cf0a8bb4ef8b90c52 (diff)
Bug fix #3098
Grmble... and now the feature ALT+J 'join triangles' broke. :) Also found out the Fkey option didn't work anymore on 2 triangles (makes 1 quad too). Luckily we got people testing eh!
Diffstat (limited to 'source/blender/src/editmesh_add.c')
-rw-r--r--source/blender/src/editmesh_add.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/source/blender/src/editmesh_add.c b/source/blender/src/editmesh_add.c
index 2d402b0a5f6..052d1eb02ff 100644
--- a/source/blender/src/editmesh_add.c
+++ b/source/blender/src/editmesh_add.c
@@ -315,6 +315,26 @@ static EditFace *addface_from_edges(void)
return NULL;
}
+/* checks for existance, and for tria overlapping inside quad */
+static EditFace *exist_face_overlaps(EditVert *v1, EditVert *v2, EditVert *v3, EditVert *v4)
+{
+ EditMesh *em = G.editMesh;
+ EditFace *efa, efatest;
+
+ efatest.v1= v1;
+ efatest.v2= v2;
+ efatest.v3= v3;
+ efatest.v4= v4;
+
+ efa= em->faces.first;
+ while(efa) {
+ if(compareface(&efatest, efa, 3)) return efa;
+ efa= efa->next;
+ }
+ return NULL;
+}
+
+
void addedgeface_mesh(void)
{
EditMesh *em = G.editMesh;
@@ -360,7 +380,8 @@ void addedgeface_mesh(void)
efa= NULL; // check later
if(amount==3) {
- if(exist_face(neweve[0], neweve[1], neweve[2], 0)==0) {
+
+ if(exist_face_overlaps(neweve[0], neweve[1], neweve[2], NULL)==0) {
efa= addfacelist(neweve[0], neweve[1], neweve[2], 0, NULL, NULL);
EM_select_face(efa, 1);