[Bf-extensions-cvs] [46a9160c] master: Fix T60387: Blender 2.8 OBJ file format not work in import mode.

Bastien Montagne noreply at git.blender.org
Fri Jan 11 11:49:30 CET 2019


Commit: 46a9160c6f67d60610fdcc1dadbe3946a7010625
Author: Bastien Montagne
Date:   Fri Jan 11 11:48:17 2019 +0100
Branches: master
https://developer.blender.org/rBA46a9160c6f67d60610fdcc1dadbe3946a7010625

Fix T60387: Blender 2.8 OBJ file format not work in import mode.

Bloody stupid mistake in 'speed-up parsing' work, yet annoyingly
difficult to spot on... :(

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

M	io_scene_obj/__init__.py
M	io_scene_obj/import_obj.py

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

diff --git a/io_scene_obj/__init__.py b/io_scene_obj/__init__.py
index 7fcb0a97..7286f251 100644
--- a/io_scene_obj/__init__.py
+++ b/io_scene_obj/__init__.py
@@ -21,7 +21,7 @@
 bl_info = {
     "name": "Wavefront OBJ format",
     "author": "Campbell Barton, Bastien Montagne",
-    "version": (3, 5, 4),
+    "version": (3, 5, 5),
     "blender": (2, 80, 0),
     "location": "File > Import-Export",
     "description": "Import-Export OBJ, Import OBJ mesh, UV's, materials and textures",
diff --git a/io_scene_obj/import_obj.py b/io_scene_obj/import_obj.py
index 1b30a37b..ba0c5158 100644
--- a/io_scene_obj/import_obj.py
+++ b/io_scene_obj/import_obj.py
@@ -969,9 +969,9 @@ def load(context,
                 # and only fallback to full multi-line parsing when needed, this gives significant speed-up
                 # (~40% on affected code).
                 if line_start == b'v':
-                    vdata, vdata_len, do_quick_vert = (verts_loc, 3, not skip_quick_vert)
+                    vdata, vdata_len, do_quick_vert = verts_loc, 3, not skip_quick_vert
                 elif line_start == b'vn':
-                    vdata, vdata_len, do_quick_vert = (verts_nor, 3, not skip_quick_vert)
+                    vdata, vdata_len, do_quick_vert = verts_nor, 3, not skip_quick_vert
                 elif line_start == b'vt':
                     vdata, vdata_len, do_quick_vert = verts_tex, 2, not skip_quick_vert
                 elif context_multi_line == b'v':
@@ -995,7 +995,8 @@ def load(context,
                             if quick_vert_failures > 10000:
                                 skip_quick_vert = True
                     if not do_quick_vert:
-                        context_multi_line = handle_vec(line_start, context_multi_line, line_split, b'v', vdata, vec, vdata_len)
+                        context_multi_line = handle_vec(line_start, context_multi_line, line_split,
+                                                        context_multi_line or line_start, vdata, vec, vdata_len)
 
                 elif line_start == b'f' or context_multi_line == b'f':
                     if not context_multi_line:



More information about the Bf-extensions-cvs mailing list