FBX IO: Material index access with attributes #104646

Merged
Bastien Montagne merged 1 commits from Mysteryem/blender-addons:attribute_access_material_index_pr into main 2023-06-26 13:05:47 +02:00

1 Commits

Author SHA1 Message Date
Thomas Barlow cd43964f87 FBX IO: Material index access with attributes
Blender 3.4 moved material indices to a generic attribute. The old API
still works for now, but is slower and may be removed in 4.0, so this
patch updates FBX IO to use the new "material_index" attribute.

This patch changes the export of meshes that have multiple materials,
but where all the polygons are assigned to the first material (so there
is no "material_index" attribute) to export using the "AllSame" type.
Material indices exported in this way export in negligible constant
time.
2023-06-26 13:02:58 +02:00