Skip to content
Snippets Groups Projects
Commit ecb43feb authored by Campbell Barton's avatar Campbell Barton
Browse files

Fix T37553: Some FBX files have some '-1' (invalid) indices in mapped layers

I can't find any docs on this but from checking the file these can be
safely ignored.
parent 6501c6ca
No related branches found
No related tags found
No related merge requests found
......@@ -431,8 +431,9 @@ def blen_read_geom_array_mapped_polyloop(
if fbx_layer_ref == b'IndexToDirect':
assert(fbx_layer_index is not None)
for i, j in enumerate(fbx_layer_index):
setattr(blen_data[i], blend_attr,
fbx_layer_data[(j * stride): (j * stride) + item_size])
if j != -1:
setattr(blen_data[i], blend_attr,
fbx_layer_data[(j * stride): (j * stride) + item_size])
return True
else:
print("warning layer %r ref type unsupported: %r" % (descr, fbx_layer_ref))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment