diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2018-10-15 10:58:40 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2018-10-15 11:04:41 +0300 |
commit | 3aa692ee44df29670b4a03e29ab1f546b3b0c553 (patch) | |
tree | 779e19059c66a24ab5e65ae546b1abb24d41fb13 | |
parent | 567af520718f52f1a0128efb4ca1ca2a8acb0638 (diff) |
Fix T57113: OBJ material import int conversion
-rw-r--r-- | io_scene_obj/import_obj.py | 8 |
1 files changed, 7 insertions, 1 deletions
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, *, |