Revision: 20848 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20848 Author: campbellbarton Date: 2009-06-13 11:33:55 +0200 (Sat, 13 Jun 2009)
Log Message: ----------- in some cases importing without materials could raise a python error. surprising nobody found before. reported by <chewed-on> who doesnt want his real name used for some reason. Modified Paths: -------------- trunk/blender/release/scripts/import_obj.py Modified: trunk/blender/release/scripts/import_obj.py =================================================================== --- trunk/blender/release/scripts/import_obj.py 2009-06-13 08:04:43 UTC (rev 20847) +++ trunk/blender/release/scripts/import_obj.py 2009-06-13 09:33:55 UTC (rev 20848) @@ -166,12 +166,13 @@ del temp_mtl #Create new materials - for name in unique_materials.iterkeys(): - unique_materials[name]= bpy.data.materials.new(name) + for name in unique_materials: # .keys() + if name != None: + unique_materials[name]= bpy.data.materials.new(name) + unique_material_images[name]= None, False # assign None to all material images to start with, add to later. - unique_material_images[name]= None, False # assign None to all material images to start with, add to later. - unique_materials[None]= None + unique_material_images[None]= None, False for libname in material_libs: mtlpath= DIR + libname _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs