[Bf-extensions-cvs] [53fbbe4] master: Fix OBJ import loading lines with tex coords (ignore them)

Campbell Barton noreply at git.blender.org
Wed Jan 15 05:29:03 CET 2014


Commit: 53fbbe43ac770058a87dac0015b765923185fb48
Author: Campbell Barton
Date:   Wed Jan 15 15:28:36 2014 +1100
https://developer.blender.org/rBA53fbbe43ac770058a87dac0015b765923185fb48

Fix OBJ import loading lines with tex coords (ignore them)

===================================================================

M	io_scene_obj/import_obj.py

===================================================================

diff --git a/io_scene_obj/import_obj.py b/io_scene_obj/import_obj.py
index a295752..fc3eb9c 100644
--- a/io_scene_obj/import_obj.py
+++ b/io_scene_obj/import_obj.py
@@ -991,7 +991,8 @@ def load(operator, context, filepath,
             # isline = line_start == b'l'  # UNUSED
 
             for v in line_split:
-                vert_loc_index = int(v) - 1
+                obj_vert = v.split(b'/')
+                vert_loc_index = int(obj_vert[0]) - 1
 
                 # Make relative negative vert indices absolute
                 if vert_loc_index < 0:



More information about the Bf-extensions-cvs mailing list