[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [4176] contrib/py/scripts/addons/ io_atomblend_utilities: Three types of icospheres can now be used, with sub-division 1, 2 and 3.

Clemens Barth barth at root-1.de
Fri Jan 18 20:16:46 CET 2013


Revision: 4176
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=4176
Author:   blendphys
Date:     2013-01-18 19:16:46 +0000 (Fri, 18 Jan 2013)
Log Message:
-----------
Three types of icospheres can now be used, with sub-division 1, 2 and 3.

Blendphys.

Modified Paths:
--------------
    contrib/py/scripts/addons/io_atomblend_utilities/__init__.py
    contrib/py/scripts/addons/io_atomblend_utilities/io_atomblend_utilities.py

Modified: contrib/py/scripts/addons/io_atomblend_utilities/__init__.py
===================================================================
--- contrib/py/scripts/addons/io_atomblend_utilities/__init__.py	2013-01-18 19:01:00 UTC (rev 4175)
+++ contrib/py/scripts/addons/io_atomblend_utilities/__init__.py	2013-01-18 19:16:46 UTC (rev 4176)
@@ -213,7 +213,9 @@
                ('2',"Plane", "Replace with a plane"),
                ('3a',"Circle", "Replace with a circle"),
                ('3b',"Circle (NURBS)", "Replace with a circle (NURBS)"),               
-               ('4',"Icosphere", "Replace with a icosphere"),              
+               ('4a',"Icosphere 1", "Replace with a icosphere, subd=1"),  
+               ('4b',"Icosphere 2", "Replace with a icosphere, subd=2"),  
+               ('4c',"Icosphere 3", "Replace with a icosphere, subd=3"),                             
                ('5a',"Cylinder", "Replace with a cylinder"),
                ('5b',"Cylinder (NURBS)", "Replace with a cylinder (NURBS)"),               
                ('6',"Cone", "Replace with a cone"),

Modified: contrib/py/scripts/addons/io_atomblend_utilities/io_atomblend_utilities.py
===================================================================
--- contrib/py/scripts/addons/io_atomblend_utilities/io_atomblend_utilities.py	2013-01-18 19:01:00 UTC (rev 4175)
+++ contrib/py/scripts/addons/io_atomblend_utilities/io_atomblend_utilities.py	2013-01-18 19:16:46 UTC (rev 4176)
@@ -485,8 +485,8 @@
         if scn.draw_objs == '-1':
             draw_regular_obj(name,obj.children[0],location,scale,material)                
         # Draw selected standard object
-        if scn.draw_objs in {'0a','0b','1','2','3a','3b','4','5a','5b','6',
-                             '7a','7b','8', '9', '10', '11'}:       
+        if scn.draw_objs in {'0a','0b','1','2','3a','3b','4a','4b','4c','5a',
+                             '5b','6','7a','7b','8', '9', '10', '11'}:       
             draw_obj(scn.draw_objs,name,location,scale,material)  
 
     bpy.context.scene.objects.active = obj
@@ -543,8 +543,17 @@
             enter_editmode=False, 
             location=location, 
             rotation=(0, 0, 0), 
+            layers=current_layers)
+    if obj_type == '4a': #Icosphere, subdivision=1        
+        bpy.ops.mesh.primitive_ico_sphere_add(
+            subdivisions=1, 
+            size=1, 
+            view_align=False, 
+            enter_editmode=False, 
+            location=location, 
+            rotation=(0, 0, 0), 
             layers=current_layers)                
-    if obj_type == '4': #Icosphere         
+    if obj_type == '4b': #Icosphere, subdivision=2
         bpy.ops.mesh.primitive_ico_sphere_add(
             subdivisions=2, 
             size=1, 
@@ -553,6 +562,15 @@
             location=location, 
             rotation=(0, 0, 0), 
             layers=current_layers)                
+    if obj_type == '4c': #Icosphere, subdivision=3
+        bpy.ops.mesh.primitive_ico_sphere_add(
+            subdivisions=3, 
+            size=1, 
+            view_align=False, 
+            enter_editmode=False, 
+            location=location, 
+            rotation=(0, 0, 0), 
+            layers=current_layers)                
     if obj_type == '5a': #Cylinder
         bpy.ops.mesh.primitive_cylinder_add(
             vertices=32, 



More information about the Bf-extensions-cvs mailing list