serious bugfix to the material exporter

metadata
Wenzel Jakob 2010-11-21 12:53:03 +01:00
parent d631da2187
commit a7fba35ef0
2 changed files with 8 additions and 2 deletions

View File

@ -35,7 +35,7 @@ class MtsAdjustments:
self.target_dir = target_dir
self.exported_materials = []
self.exported_textures = []
self.materials = materials if materials != None else bpy.data.textures
self.materials = materials if materials != None else bpy.data.materials
self.textures = textures if textures != None else bpy.data.textures
def exportWorldtrafo(self, trafo):
@ -142,7 +142,8 @@ class MtsAdjustments:
if name in self.materials:
return self.materials[name]
else:
raise Exception('Failed to find material "%s"' % name)
raise Exception('Failed to find material "%s" in "%s"' % (name,
str(self.materials)))
def exportTexture(self, mat):
if mat.name in self.exported_textures:

View File

@ -6,3 +6,8 @@ Blender application bundle (e.g. \code{blender.app/Contents/MacOS/}\textbf{<BLEN
When specifying the Mitsuba executable path, note that you must again provide
the path to the binary within the application bundle, e.g. \code{/Applications/Mitsuba.app/Contents/MacOS/mitsuba}
\subsection{General information}
- MtsBlend always uses the first material slot as the main material of an
object. When building custom materials (e.g. mixtures using the compound BSDF),
make sure that the first slot contains the final material you wish to assign.