-
Bastien Montagne authored
As usual with FBX, 'official' doc of SDK says one thing, actual FBX files produced by 'official' apps say something else. This time, it’s about mapping types - looks like it is actually 'valid' to have layer arrays shorter than actual number of relevant geometry elements (verts, edges, etc.). Don't know how the SDK handles those case, for now we simply stop filling blen's data layers once we have reached the end of fbx data layer's array. Since I was messing with this code, I also refactored it a bit to make it more generic. Also removed some optimization (like when stride is 1), we loose a few percents of speed, but nothing critical, and code is much cleaner and generic now. Only had to keep one exception - seems common to have Poly data with 'IndexToDirect' mapping without any mapping data - ***sigh***!!!
Bastien Montagne authoredAs usual with FBX, 'official' doc of SDK says one thing, actual FBX files produced by 'official' apps say something else. This time, it’s about mapping types - looks like it is actually 'valid' to have layer arrays shorter than actual number of relevant geometry elements (verts, edges, etc.). Don't know how the SDK handles those case, for now we simply stop filling blen's data layers once we have reached the end of fbx data layer's array. Since I was messing with this code, I also refactored it a bit to make it more generic. Also removed some optimization (like when stride is 1), we loose a few percents of speed, but nothing critical, and code is much cleaner and generic now. Only had to keep one exception - seems common to have Poly data with 'IndexToDirect' mapping without any mapping data - ***sigh***!!!