diff options
-rw-r--r-- | io_scene_obj/__init__.py | 2 | ||||
-rw-r--r-- | io_scene_obj/import_obj.py | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/io_scene_obj/__init__.py b/io_scene_obj/__init__.py index e20d50ea..df600bf1 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, 8, 0), + "version": (3, 8, 1), "blender": (2, 81, 6), "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 a303eda5..470e85ec 100644 --- a/io_scene_obj/import_obj.py +++ b/io_scene_obj/import_obj.py @@ -1025,6 +1025,10 @@ def load(context, line_start = line_split[0] # we compare with this a _lot_ + if len(line_split) == 1 and not context_multi_line and line_start != b'end': + print("WARNING, skipping malformatted line: %s" % line.decode('UTF-8', 'replace').rstrip()) + continue + # Handling vertex data are pretty similar, factorize that. # Also, most OBJ files store all those on a single line, so try fast parsing for that first, # and only fallback to full multi-line parsing when needed, this gives significant speed-up |