[Bf-extensions-cvs] [f5536e5e] master: Fix T53702: OBJ MTL fails w/ negative numbers

Campbell Barton noreply at git.blender.org
Mon Jan 8 06:12:21 CET 2018


Commit: f5536e5e49c34dfc0a7b8990257cd393339e23c6
Author: Campbell Barton
Date:   Mon Jan 8 16:16:41 2018 +1100
Branches: master
https://developer.blender.org/rBAf5536e5e49c34dfc0a7b8990257cd393339e23c6

Fix T53702: OBJ MTL fails w/ negative numbers

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

M	io_scene_obj/import_obj.py

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

diff --git a/io_scene_obj/import_obj.py b/io_scene_obj/import_obj.py
index c120e540..c4275606 100644
--- a/io_scene_obj/import_obj.py
+++ b/io_scene_obj/import_obj.py
@@ -109,7 +109,7 @@ def create_materials(filepath, relpath,
 
         curr_token = []
         for token in img_data[:-1]:
-            if token.startswith(b'-'):
+            if token.startswith(b'-') and token[1:].isalpha():
                 if curr_token:
                     map_options[curr_token[0]] = curr_token[1:]
                 curr_token[:] = []



More information about the Bf-extensions-cvs mailing list