nem0 / OpenFBX

Lightweight open source FBX importer
MIT License
1.15k stars 135 forks source link

fix error when loading from text mode fbx files. #66

Closed cpxnet closed 3 years ago

cpxnet commented 3 years ago

this should be a copy&paste error. Cause blend shape import error from text format files.

nem0 commented 3 years ago

Hi, do you have an example fbx where this fails?

cpxnet commented 3 years ago

Sorry I can't share my fbx to you. But it's easy to reproduce with any fbx with blendshapes exported as binary format. The idea is fromString will consume 3 instead of 1 float for T = Vec3. Looping with property.count will leaving the last elements repeating the same value.

BTW the function parseTextArrayRaw() right blow is using 'while (iter < property.value.end)' and it works well.

Hope that helps

nem0 commented 3 years ago

Thanks, merged