[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [3453] contrib/py/scripts/addons/ oscurart_tools.py: Add Curves to Render Tools

Eugenio Pignataro info at oscurart.com.ar
Tue Jun 5 15:15:35 CEST 2012


Revision: 3453
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3453
Author:   oscurart
Date:     2012-06-05 13:15:32 +0000 (Tue, 05 Jun 2012)
Log Message:
-----------
Add Curves to Render Tools

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

Modified: contrib/py/scripts/addons/oscurart_tools.py
===================================================================
--- contrib/py/scripts/addons/oscurart_tools.py	2012-06-05 09:53:17 UTC (rev 3452)
+++ contrib/py/scripts/addons/oscurart_tools.py	2012-06-05 13:15:32 UTC (rev 3453)
@@ -851,7 +851,7 @@
     for OBJECT in bpy.data.objects[:]:
         SLOTLIST=[]
         try:
-            if OBJECT.type=="MESH" or OBJECT.type == "META":
+            if OBJECT.type=="MESH" or OBJECT.type == "META" or OBJECT.type == "CURVE":
                 for SLOT in OBJECT.material_slots[:]:
                     SLOTLIST.append(SLOT.material)
 
@@ -884,7 +884,7 @@
         try:
             for OVERRIDE in PROPTOLIST:
                 for OBJECT in bpy.data.groups[OVERRIDE[0]].objects[:]:
-                    if OBJECT.type == "MESH" or OBJECT.type == "META":
+                    if OBJECT.type == "MESH" or OBJECT.type == "META" or OBJECT.type == "CURVE":
                         for SLOT in OBJECT.material_slots[:]:
                             SLOT.material=bpy.data.materials[OVERRIDE[1]]
         except:
@@ -985,7 +985,7 @@
     for OBJECT in bpy.data.objects[:]:
         SLOTLIST=[]
         try:
-            if OBJECT.type == "MESH" or OBJECT.type == "META":
+            if OBJECT.type == "MESH" or OBJECT.type == "META" or OBJECT.type == "CURVE":
                 for SLOT in OBJECT.material_slots[:]:
                     SLOTLIST.append(SLOT.material)
 
@@ -1017,7 +1017,7 @@
             try:
                 for OVERRIDE in PROPTOLIST:
                     for OBJECT in bpy.data.groups[OVERRIDE[0]].objects[:]:
-                        if OBJECT.type == "MESH" or OBJECT.type == "META":
+                        if OBJECT.type == "MESH" or OBJECT.type == "META" or OBJECT.type == "CURVE":
                             for SLOT in OBJECT.material_slots[:]:
                                 SLOT.material=bpy.data.materials[OVERRIDE[1]]
             except:
@@ -1116,7 +1116,7 @@
     for OBJECT in bpy.data.objects[:]:
         SLOTLIST = []
         try:
-            if OBJECT.type == "MESH" or OBJECT.type == "META":
+            if OBJECT.type == "MESH" or OBJECT.type == "META" or OBJECT.type == "CURVE":
                 for SLOT in OBJECT.material_slots[:]:
                     SLOTLIST.append(SLOT.material)
                 LISTMAT.append((OBJECT,SLOTLIST))
@@ -1141,7 +1141,7 @@
     try:
         for OVERRIDE in PROPTOLIST:
             for OBJECT in bpy.data.groups[OVERRIDE[0]].objects[:]:
-                if OBJECT.type == "MESH" or OBJECT.type == "META":
+                if OBJECT.type == "MESH" or OBJECT.type == "META" or OBJECT.type == "CURVE":
                     for SLOT in OBJECT.material_slots[:]:
                         SLOT.material = bpy.data.materials[OVERRIDE[1]]
     except:
@@ -2356,16 +2356,15 @@
         for OBJECT in bpy.data.objects[:]:
             SLOTLIST = []
             try:
-                if OBJECT.type == "MESH" or OBJECT.type == "META":
-                    for SLOT in OBJECT.material_slots[:]:
-                        SLOTLIST.append(SLOT.material)
+                if OBJECT.type == "MESH" or OBJECT.type == "META" or OBJECT.type == "CURVE":
+                    SLOTLIST = [SLOT.material for SLOT in OBJECT.material_slots[:]]
                     LISTMAT.append((OBJECT,SLOTLIST))
             except:
                 pass
         try:
             for OVERRIDE in PROPTOLIST:
                 for OBJECT in bpy.data.groups[OVERRIDE[0]].objects[:]:
-                    if OBJECT.type == "MESH" or OBJECT.type == "META":
+                    if OBJECT.type == "MESH" or OBJECT.type == "META" or OBJECT.type == "CURVE":
                         for SLOT in OBJECT.material_slots[:]:
                             SLOT.material = bpy.data.materials[OVERRIDE[1]]
         except:
@@ -2569,4 +2568,4 @@
 bpy.utils.register_class(OscApplyOverrides)
 bpy.utils.register_class(OscRestoreOverrides)
 bpy.utils.register_class(OscCheckOverrides)
-bpy.utils.register_class(OscSelection)
+bpy.utils.register_class(OscSelection)
\ No newline at end of file



More information about the Bf-extensions-cvs mailing list