diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-03-19 19:23:28 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-03-19 19:23:28 +0300 |
commit | cb2f133712599040b2f5ffaa1f9ff2e3a1e55e73 (patch) | |
tree | 8a0d6ecc327cabcd62e1bab3fcd9c8ab44972c12 | |
parent | 1c9d5a8507acfe76b7d4770f8436af0456ee9f55 (diff) |
Fix T47831: Obj_Import_Problem.
Actually, think that's not valid OBJ (using '0' index instead of nothing when not assigning data to some face corner).
But since supporting this is easy...
-rw-r--r-- | io_scene_obj/__init__.py | 4 | ||||
-rw-r--r-- | io_scene_obj/import_obj.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/io_scene_obj/__init__.py b/io_scene_obj/__init__.py index aff0b345..daeed232 100644 --- a/io_scene_obj/__init__.py +++ b/io_scene_obj/__init__.py @@ -21,8 +21,8 @@ bl_info = { "name": "Wavefront OBJ format", "author": "Campbell Barton, Bastien Montagne", - "version": (2, 3, 0), - "blender": (2, 76, 0), + "version": (2, 3, 1), + "blender": (2, 77, 0), "location": "File > Import-Export", "description": "Import-Export OBJ, Import OBJ mesh, UV's, materials and textures", "warning": "", diff --git a/io_scene_obj/import_obj.py b/io_scene_obj/import_obj.py index 7b065824..2028a1ca 100644 --- a/io_scene_obj/import_obj.py +++ b/io_scene_obj/import_obj.py @@ -1015,14 +1015,14 @@ def load(context, # formatting for faces with normals and textures is # loc_index/tex_index/nor_index - if len(obj_vert) > 1 and obj_vert[1]: + if len(obj_vert) > 1 and obj_vert[1] and obj_vert[1] != b'0': idx = int(obj_vert[1]) - 1 face_vert_tex_indices.append((idx + len(verts_tex) + 1) if (idx < 0) else idx) face_vert_tex_valid = True else: face_vert_tex_indices.append(...) - if len(obj_vert) > 2 and obj_vert[2]: + if len(obj_vert) > 2 and obj_vert[2] and obj_vert[2] != b'0': idx = int(obj_vert[2]) - 1 face_vert_nor_indices.append((idx + len(verts_nor) + 1) if (idx < 0) else idx) face_vert_nor_valid = True |