diff options
Diffstat (limited to 'io_scene_obj/import_obj.py')
-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 2bf4ac94..916ff313 100644 --- a/io_scene_obj/import_obj.py +++ b/io_scene_obj/import_obj.py @@ -318,7 +318,7 @@ def create_materials(filepath, relpath, # rgb, filter color, blender has no support for this. print("WARNING, currently unsupported 'tf' filter color option, skipped.") 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: @@ -835,6 +835,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, *, |