diff options
Diffstat (limited to 'io_scene_obj/export_obj.py')
-rw-r--r-- | io_scene_obj/export_obj.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/io_scene_obj/export_obj.py b/io_scene_obj/export_obj.py index d1b3918d..3317438d 100644 --- a/io_scene_obj/export_obj.py +++ b/io_scene_obj/export_obj.py @@ -492,7 +492,8 @@ def write_file(filepath, objects, scene, if EXPORT_GROUP_BY_MAT: # can be mat_image or (null) fw("g %s_%s\n" % (name_compat(ob.name), name_compat(ob.data.name))) # can be mat_image or (null) - fw("usemtl (null)\n") # mat, image + if EXPORT_MTL: + fw("usemtl (null)\n") # mat, image else: mat_data = mtl_dict.get(key) @@ -511,8 +512,8 @@ def write_file(filepath, objects, scene, if EXPORT_GROUP_BY_MAT: fw("g %s_%s_%s\n" % (name_compat(ob.name), name_compat(ob.data.name), mat_data[0])) # can be mat_image or (null) - - fw("usemtl %s\n" % mat_data[0]) # can be mat_image or (null) + if EXPORT_MTL: + fw("usemtl %s\n" % mat_data[0]) # can be mat_image or (null) contextMat = key if f_smooth != contextSmooth: |