diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-01-30 05:01:16 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-01-30 05:01:16 +0300 |
commit | 0409977aa8b91a88095a74f4fbfcc40fab0cbad7 (patch) | |
tree | 8c2a6080aa5a88c153ad7d0ae4fa8839a3d260ed /release | |
parent | 56d2dc7e7f3f029fab442ea0cc9673583328fb46 (diff) |
[#18241] Very minor bugfix and typo correction for wavefront obj exporter and importer python scripts
from Michael Judd.
Also removed .keys() for a loop in impor_obj.py since its the default dictionary iterator.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/export_obj.py | 2 | ||||
-rw-r--r-- | release/scripts/import_obj.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/release/scripts/export_obj.py b/release/scripts/export_obj.py index 9feb02638c3..28e1443e953 100644 --- a/release/scripts/export_obj.py +++ b/release/scripts/export_obj.py @@ -120,7 +120,7 @@ def write_mtl(filename): if img: # We have an image on the face! file.write('map_Kd %s\n' % img.filename.split('\\')[-1].split('/')[-1]) # Diffuse mapping image - elif not mat: # No face image. if we havea material search for MTex image. + elif mat: # No face image. if we havea material search for MTex image. for mtex in mat.getTextures(): if mtex and mtex.tex.type == Blender.Texture.Types.IMAGE: try: diff --git a/release/scripts/import_obj.py b/release/scripts/import_obj.py index 3aad0800cf7..42cdac4dc35 100644 --- a/release/scripts/import_obj.py +++ b/release/scripts/import_obj.py @@ -424,8 +424,8 @@ def create_mesh(scn, new_objects, has_ngons, CREATE_FGONS, CREATE_EDGES, verts_l sharp_edges[key]= None - # mat the material names to an index - material_mapping= dict([(name, i) for i, name in enumerate(unique_materials.keys())]) + # map the material names to an index + material_mapping= dict([(name, i) for i, name in enumerate(unique_materials)]) # enumerate over unique_materials keys() materials= [None] * len(unique_materials) |