projects
/
blender-staging.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0a5c995
)
Fixed a stupid bug when exporting meshes with empty material slots.
author
Campbell Barton <ideasman42@gmail.com>
Fri, 27 Jan 2006 14:55:12 +0000
(14:55 +0000)
committer
Campbell Barton <ideasman42@gmail.com>
Fri, 27 Jan 2006 14:55:12 +0000
(14:55 +0000)
release/scripts/obj_export.py
patch
|
blob
|
history
diff --git
a/release/scripts/obj_export.py
b/release/scripts/obj_export.py
index 2be57884cee037e143543d6538ba4bf3cf980f0b..b57343e36dc5c992eef7ff8c35652b63a0c6984b 100644
(file)
--- a/
release/scripts/obj_export.py
+++ b/
release/scripts/obj_export.py
@@
-313,9
+313,15
@@
EXPORT_GROUP_BY_OB=False, EXPORT_GROUP_BY_MAT=False):
#materials = m.getMaterials(1) # 1 == will return None in the list.
materials = m.materials
#materials = m.getMaterials(1) # 1 == will return None in the list.
materials = m.materials
-
+ materialNames = []
if materials:
if materials:
- materialNames = map(lambda mat: mat.name, materials) # Bug Blender, dosent account for null materials, still broken.
+ for mat in materials:
+ if mat: # !=None
+ materialNames.append(mat.name)
+ else:
+ materialNames.append(None)
+ # Cant use LC because some materials are None.
+ # materialNames = map(lambda mat: mat.name, materials) # Bug Blender, dosent account for null materials, still broken.
else:
materialNames = []
else:
materialNames = []