Skip to content

Commit a85b0fa

Browse files
committed
Custom normals export: Update comments
1 parent 9097af6 commit a85b0fa

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

export/mesh_converter.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,12 @@ def get_custom_normals_slow(mesh):
2626
if not mesh.has_custom_normals:
2727
return None
2828

29-
# Note: for readability, split_normals_array should be of shape (n_loops, 3),
29+
# Note: for readability, custom_normals should be of shape (n_loops, 3),
3030
# where each row is a normal vector.
3131
# However, foreach_get() needs a flat sequence,
32-
# so to save two ravel() operations, a flat array is used directly
32+
# so to save two ravel() operations, a flat array is used directly.
33+
# dtype=np.float32 is used because this matches Blenders internal data structure
34+
# and leads to significantly faster processing.
3335
n_loops = len(mesh.loops)
3436
custom_normals = np.empty(n_loops * 3, dtype = np.float32)
3537
mesh.loops.foreach_get('normal', custom_normals)

0 commit comments

Comments
 (0)