[Bf-extensions-cvs] [9b5b8379] master: Fix for Fix (c): T52945: OBJ import - load_material_image - map_options not parsed correctly.
Bastien Montagne
noreply at git.blender.org
Tue Dec 19 09:12:53 CET 2017
Commit: 9b5b83797157bc46317c6c816e3353365cc05940
Author: Bastien Montagne
Date: Tue Dec 19 09:10:41 2017 +0100
Branches: master
https://developer.blender.org/rBA9b5b83797157bc46317c6c816e3353365cc05940
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