Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-12-04 11:53:18 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-12-04 11:53:18 +0400
commit27a5698154d13c0986bde99a31a54da76b35ac08 (patch)
tree5648c47b2fe9a2a7c27fc4f3d2ff83e24758bfb5
parent56b9a3e2ad2592000cce7c8af6e34e1d3124ec69 (diff)
patch [#29490] OBJ exporter with "write materrials" unchecked write a line "usemtl"
from ed gautier (edddy)
-rw-r--r--io_scene_obj/export_obj.py7
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: