FBX Import: Speed up cycles decal workaround with numpy #104497

Merged
Bastien Montagne merged 1 commits from Mysteryem/blender-addons:fbx_import_cycles_workaround_np_pr into main 2023-04-03 14:43:06 +02:00

1 Commits

Author SHA1 Message Date
Thomas Barlow 5da3d41c27 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:
blender/blender#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.
2023-04-03 14:41:45 +02:00