http://code.google.com/p/tubras/source/detail?r=1904
Modified:
/trunk/tools/blendfiles/26/03-SkyBoxDome.blend
/trunk/tools/irrb/io_export_irrlicht.py
=======================================
--- /trunk/tools/blendfiles/26/03-SkyBoxDome.blend Wed Jun 22 12:42:05 2011
+++ /trunk/tools/blendfiles/26/03-SkyBoxDome.blend Wed Jan 11 09:06:40 2012
File is too large to display a diff.
=======================================
--- /trunk/tools/irrb/io_export_irrlicht.py Mon Jan 9 22:38:46 2012
+++ /trunk/tools/irrb/io_export_irrlicht.py Wed Jan 11 09:06:40 2012
@@ -3139,7 +3139,11 @@
if bObject.type != 'MESH':
return
- material = iMaterial(bObject, 'skybox', self.exporter, None)
+ bMaterial = None
+ if len(bObject.material_slots) > 0:
+ bMaterial = bObject.material_slots[0].material
+
+ material = iMaterial(bObject, 'skybox', self.exporter, bMaterial)
topImage = sImages['top'].image
botImage = sImages['bottom'].image
leftImage = sImages['left'].image
@@ -3176,10 +3180,10 @@
if bObject.type != 'MESH':
return
- bMesh = bObject.data
bMaterial = None
- if len(bMesh.materials) > 0:
- bMaterial = bMesh.materials[0]
+ if len(bObject.material_slots) > 0:
+ bMaterial = bObject.material_slots[0].material
+
material = iMaterial(bObject, 'skydome', self.exporter, bMaterial)
i1 = getIndent(level, 3)