FBX Import: Speed up cycles decal workaround with numpy
commit5da3d41c275d90bcde1b43aa566d7d0e26e42910
authorThomas Barlow <github@mysterymayhem.co.uk>
Sat, 18 Mar 2023 03:13:33 +0000 (18 03:13 +0000)
committerBastien Montagne <mont29@noreply.localhost>
Mon, 3 Apr 2023 12:41:45 +0000 (3 14:41 +0200)
tree4f4a635890e60600e7e9af26ce3d295c03c992a5
parent47da0ad56b238ba81c88a377d17647e415b48b60
FBX Import: Speed up cycles decal workaround with numpy

Replace iteration with foreach_get/set and numpy vectorized operations

An issue introduced in Blender 3.3 makes the original code very slow:
https://projects.blender.org/blender/blender/issues/105909
So this results in about a 1500 times speedup at 6000 vertices and 3500 times at 25000 vertices.

In Blender 3.2 the new code would run about 40-60 times faster for 1000-25000+ vertices.
io_scene_fbx/import_fbx.py