[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [3515] contrib/py/scripts/addons/ space_view3d_paint_bprojection.py: BProjection: add a slider for subdivisionlevel before creating the plan

geo kgeo kgeogeo at hotmail.com
Thu Jun 21 15:15:30 CEST 2012


Revision: 3515
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3515
Author:   kgeogeo
Date:     2012-06-21 13:15:26 +0000 (Thu, 21 Jun 2012)
Log Message:
-----------
BProjection: add a slider for subdivisionlevel before creating the plan

Modified Paths:
--------------
    contrib/py/scripts/addons/space_view3d_paint_bprojection.py

Modified: contrib/py/scripts/addons/space_view3d_paint_bprojection.py
===================================================================
--- contrib/py/scripts/addons/space_view3d_paint_bprojection.py	2012-06-21 12:50:16 UTC (rev 3514)
+++ contrib/py/scripts/addons/space_view3d_paint_bprojection.py	2012-06-21 13:15:26 UTC (rev 3515)
@@ -594,8 +594,11 @@
                     col.operator("object.change_object", text="Change Object")       
 
         except:
+            ob = context.object
             col = layout.column(align = True)
             col.operator("object.addbprojectionplane", text="Add BProjection plan")
+            col = layout.column(align = True)
+            col.prop(ob, "custom_sub",text="Subdivision level")
                    
 
 # Oprerator Class to apply the image to the plane             
@@ -688,7 +691,7 @@
             bpy.data.objects['Empty for BProjection']
 
         except:                 
-            createcustomprops(context)
+            
             cm = bpy.context.object.mode
             '''tmp = context.object
             for ob in (ob for ob in bpy.data.objects if ob.type == 'MESH' and ob.hide == False and context.scene in ob.users_scene):
@@ -723,7 +726,8 @@
             for i in range(4):
                 ob.data.edges[len(ob.data.edges)-1-i].crease = 1
             bpy.ops.object.editmode_toggle()
-
+            
+            em.custom_sub = ob.custom_sub
             if em.custom_sub > 0:
                 bpy.ops.mesh.subdivide(number_cuts = em.custom_sub)
     
@@ -1305,6 +1309,7 @@
 
 def register():
     bpy.utils.register_module(__name__)
+    createcustomprops(bpy.context)
 
 def unregister():
     bpy.utils.unregister_module(__name__)



More information about the Bf-extensions-cvs mailing list