[Bf-extensions-cvs] [14e04305] blender-v2.79a-release: Fix for Fix (c): T52945: OBJ import - load_material_image - map_options not parsed correctly.

Bastien Montagne noreply at git.blender.org
Mon Jan 1 16:36:27 CET 2018


Commit: 14e04305021a83fc4a89ad4192b6b8611ca4139c
Author: Bastien Montagne
Date:   Tue Dec 19 09:10:41 2017 +0100
Branches: blender-v2.79a-release
https://developer.blender.org/rBA14e04305021a83fc4a89ad4192b6b8611ca4139c

Fix for Fix (c): T52945: OBJ import - load_material_image - map_options not parsed correctly.

rBAe8f09a8e0b28 missed the case where we have no bump multiplicator at all!

Thanks to sebastian_k for the report over IRC.

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

M	io_scene_obj/import_obj.py

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

diff --git a/io_scene_obj/import_obj.py b/io_scene_obj/import_obj.py
index ce36f5ca..c120e540 100644
--- a/io_scene_obj/import_obj.py
+++ b/io_scene_obj/import_obj.py
@@ -177,7 +177,7 @@ def create_materials(filepath, relpath,
 
         elif type == 'Bump':
             bump_mult = map_options.get(b'-bm')
-            bump_mult = float(bump_mult[0]) if len(bump_mult) > 1 else 1.0
+            bump_mult = float(bump_mult[0]) if (bump_mult is not None and len(bump_mult) > 1) else 1.0
 
             if use_cycles:
                 mat_wrap.normal_image_set(image)



More information about the Bf-extensions-cvs mailing list