- OBJ importer now reads most of the test files. Had to copy BPyMesh.ngon function to OBJ import code

- added MeshEdge.fgon property, not using it yet
- fixed in bpy_rna.c to correctly read arrays returned from RNA functions
This commit is contained in:
2009-08-06 12:22:50 +00:00
parent 59abddc202
commit 01eedc5046
6 changed files with 278 additions and 61 deletions

View File

@@ -120,7 +120,10 @@ def write_mtl(scene, filename, copy_images):
file.write('Ka %.6f %.6f %.6f\n' % tuple([c*mat.ambient for c in worldAmb]) ) # Ambient, uses mirror colour,
file.write('Kd %.6f %.6f %.6f\n' % tuple([c*mat.diffuse_reflection for c in mat.diffuse_color]) ) # Diffuse
file.write('Ks %.6f %.6f %.6f\n' % tuple([c*mat.specular_reflection for c in mat.specular_color]) ) # Specular
file.write('Ni %.6f\n' % mat.ior) # Refraction index
if hasattr(mat, "ior"):
file.write('Ni %.6f\n' % mat.ior) # Refraction index
else:
file.write('Ni %.6f\n' % 1.0)
file.write('d %.6f\n' % mat.alpha) # Alpha (obj uses 'd' for dissolve)
# 0 to disable lighting, 1 for ambient & diffuse only (specular color set to black), 2 for full lighting.