Current implementation assumes every mtl property is either integer, float, or array of float. This prevents the parser from getting texture filename from map_Kd, map_Ks, etc.
|
elif materials: |
|
if data: |
|
split_data = data.strip().split(' ') |
|
|
|
if len(split_data) > 1: |
|
material[prefix] = tuple(float(d) for d in split_data) |
|
else: |
|
try: |
|
material[prefix] = int(data) |
|
except ValueError: |
|
material[prefix] = float(data) |
This should be fixed as
elif materials:
if data:
split_data = data.strip().split(' ')
if len(split_data) > 1:
material[prefix] = tuple(float(d) for d in split_data)
else:
try:
material[prefix] = int(data)
except ValueError:
try:
material[prefix] = float(data)
except ValueError:
material[prefix] = data # accept string value
This is also a direct solution to #1
Current implementation assumes every mtl property is either integer, float, or array of float. This prevents the parser from getting texture filename from
map_Kd,map_Ks, etc.wavefront_reader/wavefront_reader/reading.py
Lines 83 to 93 in c515164
This should be fixed as
This is also a direct solution to #1