FBX IO: Corner vert/edge and edge verts access with attributes
commitd17ed07832ce77a36440dabdf73926a892be5696
authorThomas Barlow <github@mysterymayhem.co.uk>
Fri, 28 Apr 2023 01:22:24 +0000 (28 02:22 +0100)
committerGitea <gitea@fake.local>
Mon, 26 Jun 2023 15:43:23 +0000 (26 17:43 +0200)
tree3e256fc03868f67a59760f32ef16f7e2393b870b
parent39a012ca074e6ea051c51f0cfc7bb24d6b46e505
FBX IO: Corner vert/edge and edge verts access with attributes

Blender 3.6 moved corner (loop) vertex index and edge index, and edge
vertices to generic attributes. 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 ".corner_vert", ".corner_edge" and ".edge_verts" attributes.

numpy.astype() with copy=False does not create a new view in the desired
dtype when the original dtype is the same kind, itemsize and byteorder,
but has a different character code, e.g. 'i' and 'l'. This is
problematic because Blender can be picky about the character code. The
astype_view_signedness() utility function has been updated to create
such views instead of falling back to numpy.astype().

This patch makes no changes to the import or export of FBX files.

Pull Request: https://projects.blender.org/blender/blender-addons/pulls/104648
io_scene_fbx/export_fbx_bin.py
io_scene_fbx/fbx_utils.py
io_scene_fbx/import_fbx.py