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:
authorGeoffrey Bantle <hairbat@yahoo.com>2007-03-27 21:09:10 +0400
committerGeoffrey Bantle <hairbat@yahoo.com>2007-03-27 21:09:10 +0400
commit112c641263d83860e2a35e285e7814d35df97e15 (patch)
treef1e28ae1a58d8cb46c911764bb599b124c7ddf5b /source/blender/src/editmesh_tools.c
parent3ac0c09d15f5e99c8a2b01d1eed7e9ccccaf06a8 (diff)
-> Fix for bug #6327
Small fix for edge subdivide code. Handling of visibility flags was never handled properly, this should fix.
Diffstat (limited to 'source/blender/src/editmesh_tools.c')
-rw-r--r--source/blender/src/editmesh_tools.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/source/blender/src/editmesh_tools.c b/source/blender/src/editmesh_tools.c
index 900f983d26a..4d8c6ea17df 100644
--- a/source/blender/src/editmesh_tools.c
+++ b/source/blender/src/editmesh_tools.c
@@ -1288,7 +1288,8 @@ static void facecopy(EditFace *source, EditFace *target)
target->mat_nr = source->mat_nr;
target->flag = source->flag;
-
+ target->h = source->h;
+
InterpWeightsQ3Dfl(v1, v2, v3, v4, target->v1->co, w[0]);
InterpWeightsQ3Dfl(v1, v2, v3, v4, target->v2->co, w[1]);
InterpWeightsQ3Dfl(v1, v2, v3, v4, target->v3->co, w[2]);
@@ -1361,7 +1362,7 @@ static void fill_quad_single(EditFace *efa, struct GHash *gh, int numcuts, int s
}else{
hold = addfacelist(verts[(vertsize-1)/2],v[left],v[right],NULL, NULL,NULL);
hold->e1->f2 |= EDGEINNER;
- hold->e3->f2 |= EDGEINNER;
+ hold->e3->f2 |= EDGEINNER;
}
facecopy(efa,hold);
@@ -2661,6 +2662,26 @@ void esubdivideflag(int flag, float rad, int beauty, int numcuts, int seltype)
}
}
}
+
+ //fix hide flags for edges. First pass, hide edges of hidden faces
+ for(ef=em->faces.first; ef; ef=ef->next){
+ if(ef->h){
+ ef->e1->h |= 1;
+ ef->e2->h |= 1;
+ ef->e3->h |= 1;
+ if(ef->e4) ef->e4->h |= 1;
+ }
+ }
+ //second pass: unhide edges of visible faces adjacent to hidden faces
+ for(ef=em->faces.first; ef; ef=ef->next){
+ if(ef->h == 0){
+ ef->e1->h &= ~1;
+ ef->e2->h &= ~1;
+ ef->e3->h &= ~1;
+ if(ef->e4) ef->e4->h &= ~1;
+ }
+ }
+
// Free the ghash and call MEM_freeN on all the value entries to return
// that memory
BLI_ghash_free(gh, NULL, (GHashValFreeFP)MEM_freeN);