Broken for 2.74, 2.75 and 2.76
When I try to import an obj file, which is said to be exported by zmodeler, I get this
[quote]
File "E:\greensoft\3d\blender-2.74-windows64\2.74\scripts\addons\io_scene_obj\
import_obj.py", line 796, in <listcomp>
vec[:] = [float_func(v) for v in line_split[1:]]
ValueError: could not convert string to float: b'1.#QNAN'
[/quote]
Then I checked the obj file and found something like following
[quote]
vn 1.#QNAN -1.#IND -1.#IND
vn 0.970273 0.199445 -0.137085
vn 1.#QNAN -1.#IND -1.#IND
vn 0.894082 0.387011 -0.225478
vn 1.#QNAN -1.#IND -1.#IND
[/quote]
So I changed 2 lines in "def get_float_func(filepath):". Because '1.' is placed before 'QNAN', I think the change can be done by simple replace
[quote please remember this line appears twice]
return float
[/quote]
with
[quote]
return lambda f: float(f.upper().replace(b'.#QNAN', b'').replace(b'.#IND', b'').replace(b'.#NAN', b''))
[/quote]
But this should be checked wether it is a univerisal way to deal with all 'QNAN' and 'IND'.
And I when I checked scripts\addons\io_scene_obj\import_obj.py in blender 2.74/2.75/2.76, I found that all of them share the same 'get_float_func' function. So the fix will be possible for 2.74/2.75/2.76
Thanks.