[Bf-extensions-cvs] [3aa692ee] master: Fix T57113: OBJ material import int conversion
Philipp Oeser
noreply at git.blender.org
Mon Oct 15 10:11:49 CEST 2018
Commit: 3aa692ee44df29670b4a03e29ab1f546b3b0c553
Author: Philipp Oeser
Date: Mon Oct 15 09:58:40 2018 +0200
Branches: master
https://developer.blender.org/rBA3aa692ee44df29670b4a03e29ab1f546b3b0c553
Fix T57113: OBJ material import int conversion
===================================================================
M io_scene_obj/import_obj.py
===================================================================
diff --git a/io_scene_obj/import_obj.py b/io_scene_obj/import_obj.py
index c47e6638..a8e945cd 100644
--- a/io_scene_obj/import_obj.py
+++ b/io_scene_obj/import_obj.py
@@ -426,7 +426,7 @@ def create_materials(filepath, relpath,
# rgb, filter color, blender has no support for this.
pass
elif line_id == b'illum':
- illum = int(line_split[1])
+ illum = get_int(line_split[1])
# inline comments are from the spec, v4.2
if illum == 0:
@@ -957,6 +957,12 @@ def get_float_func(filepath):
return float
+def get_int(svalue):
+ if b',' in svalue:
+ return int(float(svalue.replace(b',', b'.')))
+ return int(float(svalue))
+
+
def load(context,
filepath,
*,
More information about the Bf-extensions-cvs
mailing list