[Bf-extensions-cvs] [ede55a8] master: Fix Overrides support data materials now

Eugenio Pignataro noreply at git.blender.org
Fri Dec 27 21:15:01 CET 2013


Commit: ede55a87677808e3e22c3bb7a711e0de3d359d08
Author: Eugenio Pignataro
Date:   Fri Dec 27 17:12:08 2013 -0300
https://developer.blender.org/rBACede55a87677808e3e22c3bb7a711e0de3d359d08

Fix Overrides support data materials now

===================================================================

M	oscurart_tools/oscurart_overrides.py

===================================================================

diff --git a/oscurart_tools/oscurart_overrides.py b/oscurart_tools/oscurart_overrides.py
index 1f3a34e..25f45a9 100644
--- a/oscurart_tools/oscurart_overrides.py
+++ b/oscurart_tools/oscurart_overrides.py
@@ -35,8 +35,10 @@ def DefOscApplyOverrides(self):
     for OVERRIDE in PROPTOLIST:
         for OBJECT in bpy.data.groups[OVERRIDE[0]].objects[:]:
             if OBJECT.type == "MESH" or OBJECT.type == "META" or OBJECT.type == "CURVE": 
+                LENSLOTS = len(OBJECT.material_slots[:])
                 OBJECT.data.materials.clear()
-                OBJECT.data.materials.append(bpy.data.materials[OVERRIDE[1]])  
+                for MATSLOT in range(LENSLOTS):
+                    OBJECT.data.materials.append(bpy.data.materials[OVERRIDE[1]])  
                 
                 #if len(OBJECT.material_slots) > 0:                   
                 #    for SLOT in OBJECT.material_slots[:]:



More information about the Bf-extensions-cvs mailing list