[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [2716] trunk/py/scripts/addons/ io_scene_obj/export_obj.py: patch [#29490] OBJ exporter with " write materrials" unchecked write a line "usemtl"
Campbell Barton
ideasman42 at gmail.com
Sun Dec 4 08:53:29 CET 2011
Revision: 2716
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=2716
Author: campbellbarton
Date: 2011-12-04 07:53:18 +0000 (Sun, 04 Dec 2011)
Log Message:
-----------
patch [#29490] OBJ exporter with "write materrials" unchecked write a line "usemtl"
from ed gautier (edddy)
Modified Paths:
--------------
trunk/py/scripts/addons/io_scene_obj/export_obj.py
Modified: trunk/py/scripts/addons/io_scene_obj/export_obj.py
===================================================================
--- trunk/py/scripts/addons/io_scene_obj/export_obj.py 2011-12-03 20:45:35 UTC (rev 2715)
+++ trunk/py/scripts/addons/io_scene_obj/export_obj.py 2011-12-04 07:53:18 UTC (rev 2716)
@@ -492,7 +492,8 @@
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,9 +512,9 @@
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)
+ if EXPORT_MTL:
+ fw("usemtl %s\n" % mat_data[0]) # can be mat_image or (null)
- fw("usemtl %s\n" % mat_data[0]) # can be mat_image or (null)
-
contextMat = key
if f_smooth != contextSmooth:
if f_smooth: # on now off
More information about the Bf-extensions-cvs
mailing list