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
Branches
Tags
No related merge requests found
...@@ -431,8 +431,9 @@ def blen_read_geom_array_mapped_polyloop( ...@@ -431,8 +431,9 @@ def blen_read_geom_array_mapped_polyloop(
if fbx_layer_ref == b'IndexToDirect': if fbx_layer_ref == b'IndexToDirect':
assert(fbx_layer_index is not None) assert(fbx_layer_index is not None)
for i, j in enumerate(fbx_layer_index): for i, j in enumerate(fbx_layer_index):
setattr(blen_data[i], blend_attr, if j != -1:
fbx_layer_data[(j * stride): (j * stride) + item_size]) setattr(blen_data[i], blend_attr,
fbx_layer_data[(j * stride): (j * stride) + item_size])
return True return True
else: else:
print("warning layer %r ref type unsupported: %r" % (descr, fbx_layer_ref)) 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