Skip to content
Snippets Groups Projects
Commit 27a56981 authored by Campbell Barton's avatar Campbell Barton
Browse files

patch [#29490] OBJ exporter with "write materrials" unchecked write a line "usemtl"

from ed gautier (edddy) 
parent 56b9a3e2
No related branches found
No related tags found
No related merge requests found
...@@ -492,6 +492,7 @@ def write_file(filepath, objects, scene, ...@@ -492,6 +492,7 @@ def write_file(filepath, objects, scene,
if EXPORT_GROUP_BY_MAT: if EXPORT_GROUP_BY_MAT:
# can be mat_image or (null) # 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("g %s_%s\n" % (name_compat(ob.name), name_compat(ob.data.name))) # can be mat_image or (null)
if EXPORT_MTL:
fw("usemtl (null)\n") # mat, image fw("usemtl (null)\n") # mat, image
else: else:
...@@ -511,7 +512,7 @@ def write_file(filepath, objects, scene, ...@@ -511,7 +512,7 @@ def write_file(filepath, objects, scene,
if EXPORT_GROUP_BY_MAT: 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("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 contextMat = key
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment