[Bf-extensions-cvs] [5509187b] master: Fix second part of T60381: OBJ import of textures would fail when map scale/offset was specified.

Bastien Montagne noreply at git.blender.org
Fri Jan 11 11:01:56 CET 2019


Commit: 5509187b4dc331a3d7efb0d70baf691041341276
Author: Bastien Montagne
Date:   Fri Jan 11 11:00:38 2019 +0100
Branches: master
https://developer.blender.org/rBA5509187b4dc331a3d7efb0d70baf691041341276

Fix second part of T60381: OBJ import of textures would fail when map scale/offset was specified.

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

M	io_scene_obj/import_obj.py

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

diff --git a/io_scene_obj/import_obj.py b/io_scene_obj/import_obj.py
index 8050b683..1b30a37b 100644
--- a/io_scene_obj/import_obj.py
+++ b/io_scene_obj/import_obj.py
@@ -125,6 +125,10 @@ def create_materials(filepath, relpath,
 
         map_offset = map_options.get(b'-o')
         map_scale = map_options.get(b'-s')
+        if map_offset is not None:
+            map_offset = tuple(map(float_func, map_offset))
+        if map_scale is not None:
+            map_scale = tuple(map(float_func, map_scale))
 
         def _generic_tex_set(nodetex, image, texcoords, translation, scale):
             nodetex.image = image



More information about the Bf-extensions-cvs mailing list