diff --git a/io_scene_obj/import_obj.py b/io_scene_obj/import_obj.py index c47e66385f961bb081e56cf6a8d3f2fe92e9fcf4..a8e945cdd3e224bde715b16b3e804aac549d767d 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, *,