From d7d6220845ed563fb23124b0657417fd03c6185c Mon Sep 17 00:00:00 2001 From: Thomas Barlow Date: Mon, 10 Apr 2023 20:57:21 +0100 Subject: [PATCH] FBX IO: Vertex normals access with new `vertex_normals` property Blender 3.1 moved vertex normals to a separate array. 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 `vertex_normals` property. This patch makes no changes to the import or export of FBX files. --- io_scene_fbx/import_fbx.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/io_scene_fbx/import_fbx.py b/io_scene_fbx/import_fbx.py index fd9d835aa..b383d0aac 100644 --- a/io_scene_fbx/import_fbx.py +++ b/io_scene_fbx/import_fbx.py @@ -3530,7 +3530,7 @@ def load(operator, context, filepath="", vcos = np.empty(num_verts * 3, dtype=blen_cos_dtype) vnorm = np.empty(num_verts * 3, dtype=blen_norm_dtype) mesh.vertices.foreach_get("co", vcos) - mesh.vertices.foreach_get("normal", vnorm) + mesh.vertex_normals.foreach_get("vector", vnorm) vcos += vnorm * decal_offset -- 2.30.2