[tubras] r1904 committed - Update to pull skybox material attributes from Blender material. UV Wr...

3 views
Skip to first unread message

tub...@googlecode.com

unread,
Jan 11, 2012, 12:08:00 PM1/11/12
to tubras-s...@googlegroups.com
Revision: 1904
Author: pc0der
Date: Wed Jan 11 09:06:40 2012
Log: Update to pull skybox material attributes from Blender material.
UV Wrap
should be set to clamp_to_edge to prevent seams from showing.

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)

Reply all
Reply to author
Forward
0 new messages