Revision: 40953
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40953
Author:   ender79
Date:     2011-10-12 13:01:06 +0000 (Wed, 12 Oct 2011)
Log Message:
-----------
For edge slide also save the hide state of the faces the edge will slide on so 
it doesn't get overwritten to visible.

Modified Paths:
--------------
    branches/bmesh/blender/source/blender/editors/transform/transform.c

Modified: branches/bmesh/blender/source/blender/editors/transform/transform.c
===================================================================
--- branches/bmesh/blender/source/blender/editors/transform/transform.c 
2011-10-12 12:55:32 UTC (rev 40952)
+++ branches/bmesh/blender/source/blender/editors/transform/transform.c 
2011-10-12 13:01:06 UTC (rev 40953)
@@ -4645,7 +4645,7 @@
                        BMIter liter2;
                        BMFace *copyf, *copyf2;
                        BMLoop *l2;
-                       int sel, do_vdata;
+                       int sel, hide, do_vdata;
                        
                        if (BLI_smallhash_haskey(&visit, (uintptr_t)f))
                                continue;
@@ -4653,8 +4653,10 @@
                        BLI_smallhash_insert(&visit, (uintptr_t)f, NULL);
                        
                        /*the face attributes of the copied face will get
-                         copied over, so its necessary to save the selection 
state*/
+                         copied over, so its necessary to save the selection
+                         and hidden state*/
                        sel = BM_TestHFlag(f, BM_SELECT);
+                       hide = BM_TestHFlag(f, BM_HIDDEN);
                        
                        copyf2 = BLI_smallhash_lookup(&sld->origfaces, 
(uintptr_t)f);
                        
@@ -4693,10 +4695,9 @@
                        /*make sure face-attributes are correct (e.g. 
MTexPoly)*/
                        BM_Copy_Attributes(em->bm, em->bm, copyf2, f);
                        
-                       /*restore selection, and undo hidden flag*/
-                       BM_ClearHFlag(f, BM_HIDDEN);
-                       if (sel)
-                               BM_Select(em->bm, f, sel);
+                       /*restore selection and hidden flags*/
+                       BM_Select(em->bm, f, sel);
+                       BM_Hide(em->bm, f, hide);
                }
        }
        

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to