Skip to content
This repository was archived by the owner on Dec 26, 2023. It is now read-only.

Commit 8bd9477

Browse files
committed
Fix material writing when mat is None
Can happen when a mesh has no material, or a slot with no material set?
1 parent c300f18 commit 8bd9477

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

export_obj_so.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def write_mtl(scene, filepath, path_mode, copy_set, mtl_dict):
107107
# If several images are found,
108108
# use the image whose lower-case name comes first in lexical order
109109

110-
if image is None and mat.use_nodes:
110+
if image is None and mat and mat.use_nodes:
111111
# nodes to explore next (start from output nodes)
112112
next_explore_nodes = [
113113
node

0 commit comments

Comments
 (0)