We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2f0636c commit 0ef6659Copy full SHA for 0ef6659
export/mesh_converter.py
@@ -31,9 +31,9 @@ def get_custom_normals_slow(mesh):
31
# However, foreach_get() needs a flat sequence,
32
# so to save two ravel() operations, a flat array is used directly
33
n_loops = len(mesh.loops)
34
- split_normals_array = np.empty(n_loops * 3)
35
- mesh.loops.foreach_get('normal', split_normals_array)
36
- custom_normals = split_normals_array.tolist() # currently, LuxCore is hard-coded to expect a list.
+ custom_normals = np.empty(n_loops * 3, dtype = np.float32)
+ mesh.loops.foreach_get('normal', custom_normals)
+ custom_normals = custom_normals.tolist() # currently, LuxCore is hard-coded to expect a list.
37
38
return custom_normals
39
0 commit comments