Fix T57113: OBJ material import int conversion
This commit is contained in:
parent
567af52071
commit
3aa692ee44
Notes:
blender-bot
2023-02-14 19:25:32 +01:00
Referenced by issue #57113, OBJ file error
|
@ -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,
|
||||
*,
|
||||
|
|
Loading…
Reference in New Issue