Bugfix with adaptive geometry- was over subdividing some edges.
authorCampbell Barton <ideasman42@gmail.com>
Sat, 21 Jan 2006 12:33:58 +0000 (12:33 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 21 Jan 2006 12:33:58 +0000 (12:33 +0000)
Made sure all data is unselected before endering brush mode.
Also made adaptive geometry off be default.

release/scripts/bpydata/mesh_bbrush.py

index b9924e25ccd64f62fa11511b8ccb8321809a3afc..3f9c0210c29c61cb98755b5dcd2549a523bf1de0 100644 (file)
@@ -133,9 +133,8 @@ getPickRay.ortho_d = Vector(0,0,0,0) # ortho only 4d
 
 
 def ui_set_preferences(user_interface=1):
 
 
 def ui_set_preferences(user_interface=1):
-       
        # Create data and set defaults.
        # Create data and set defaults.
-       ADAPTIVE_GEOMETRY_but = Draw.Create(1)
+       ADAPTIVE_GEOMETRY_but = Draw.Create(0)
        BRUSH_MODE_but = Draw.Create(1)
        BRUSH_PRESSURE_but = Draw.Create(0.05)
        BRUSH_RADIUS_but = Draw.Create(0.25)
        BRUSH_MODE_but = Draw.Create(1)
        BRUSH_PRESSURE_but = Draw.Create(0.05)
        BRUSH_RADIUS_but = Draw.Create(0.25)
@@ -411,11 +410,22 @@ def event_main():
                        #ed.flag &= ~SEL_FLAG # deselect. 34
                        ed.flag = 32
                '''
                        #ed.flag &= ~SEL_FLAG # deselect. 34
                        ed.flag = 32
                '''
-               filter(lambda ed: setattr(ed, 'flag', 32), me.edges)
+               #filter(lambda ed: setattr(ed, 'flag', 32), me.edges)
                
                '''for v in me.verts:
                        v.sel = 0'''
                
                '''for v in me.verts:
                        v.sel = 0'''
-               filter(lambda v: setattr(v, 'sel', 0), me.verts)
+               #filter(lambda v: setattr(v, 'sel', 0), me.verts)
+               # DESELECT ABSOLUTLY ALL
+               Mesh.Mode(Mesh.SelectModes['FACE'])
+               filter(lambda f: setattr(f, 'sel', 0), me.faces)
+               
+               Mesh.Mode(Mesh.SelectModes['EDGE'])
+               filter(lambda ed: setattr(ed, 'flag', 32), me.edges)
+               
+               Mesh.Mode(Mesh.SelectModes['VERTEX'])
+               filter(lambda v: setattr(v, 'sel', 0), me.verts)                
+               
+               Mesh.Mode(Mesh.SelectModes['EDGE'])
                
        i = 0
        time = Blender.sys.time()
                
        i = 0
        time = Blender.sys.time()
@@ -809,7 +819,8 @@ def event_main():
                                                        
                                        if EDGE_COUNT:
                                                me.subdivide(1)
                                                        
                                        if EDGE_COUNT:
                                                me.subdivide(1)
-                                       
+                                               me = ob.getData(mesh=1)
+                                               filter(lambda ed: setattr(ed, 'flag', 32), me.edges)
                                                        
                                        # Deselect all, we know theres only 2 selected
                                        '''
                                                        
                                        # Deselect all, we know theres only 2 selected
                                        '''