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>2004-10-20 16:39:48 +0400
committerTon Roosendaal <ton@blender.org>2004-10-20 16:39:48 +0400
commit0582a8513d1df7dca850ed6190fbb3c75277ebd3 (patch)
tree7eddc2193f8e935b6c72ad66912b34bfb854af9b /source/blender/src/editmesh_mods.c
parentfa9135385a38c9289a2dfa2320c20b68d782c1e4 (diff)
Fix for better flushing up/down of hide flags in the selection modes. Still
tricky to find the perfect rule. This version should satisfy I think ;) Aim is to have ALT+H and H doing always the same, regardless selection mode.
Diffstat (limited to 'source/blender/src/editmesh_mods.c')
-rw-r--r--source/blender/src/editmesh_mods.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/source/blender/src/editmesh_mods.c b/source/blender/src/editmesh_mods.c
index aa399005b45..837aa625915 100644
--- a/source/blender/src/editmesh_mods.c
+++ b/source/blender/src/editmesh_mods.c
@@ -1177,6 +1177,7 @@ void hide_mesh(int swap)
EditVert *eve;
EditEdge *eed;
EditFace *efa;
+ int a;
if(G.obedit==0) return;
@@ -1184,6 +1185,7 @@ void hide_mesh(int swap)
/* - vertex hidden, always means edge is hidden too
- edge hidden, always means face is hidden too
- face hidden, only set face hide
+ - then only flush back down what's absolute hidden
*/
if(G.scene->selectmode & SCE_SELECT_VERTEX) {
for(eve= em->verts.first; eve; eve= eve->next) {
@@ -1234,6 +1236,35 @@ void hide_mesh(int swap)
}
}
+ /* flush down, only whats 100% hidden */
+ for(eve= em->verts.first; eve; eve= eve->next) eve->f1= 0;
+ for(eed= em->edges.first; eed; eed= eed->next) eed->f1= 0;
+
+ if(G.scene->selectmode & SCE_SELECT_FACE) {
+ for(efa= em->faces.first; efa; efa= efa->next) {
+ if(efa->h) a= 1; else a= 2;
+ efa->e1->f1 |= a;
+ efa->e2->f1 |= a;
+ efa->e3->f1 |= a;
+ if(efa->e4) efa->e4->f1 |= a;
+ }
+ }
+
+ if(G.scene->selectmode >= SCE_SELECT_EDGE) {
+ for(eed= em->edges.first; eed; eed= eed->next) {
+ if(eed->f1==1) eed->h= 1;
+ if(eed->h) a= 1; else a= 2;
+ eed->v1->f1 |= a;
+ eed->v2->f1 |= a;
+ }
+ }
+
+ if(G.scene->selectmode >= SCE_SELECT_VERTEX) {
+ for(eve= em->verts.first; eve; eve= eve->next) {
+ if(eve->f1==1) eve->h= 1;
+ }
+ }
+
allqueue(REDRAWVIEW3D, 0);
makeDispList(G.obedit);
BIF_undo_push("Hide");
@@ -1270,6 +1301,8 @@ void reveal_mesh(void)
}
}
+ EM_select_flush();
+
allqueue(REDRAWVIEW3D, 0);
makeDispList(G.obedit);
BIF_undo_push("Reveal");