[Bf-blender-cvs] [3064fec651e] temp-vert-normals-cleanup: Fix array modifier build error after recent change in master
Hans Goudey
noreply at git.blender.org
Wed Dec 29 21:45:39 CET 2021
Commit: 3064fec651e7eab46fb562c604b4a416954e3bd2
Author: Hans Goudey
Date: Wed Dec 29 14:12:13 2021 -0600
Branches: temp-vert-normals-cleanup
https://developer.blender.org/rB3064fec651e7eab46fb562c604b4a416954e3bd2
Fix array modifier build error after recent change in master
===================================================================
M source/blender/modifiers/intern/MOD_array.c
===================================================================
diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c
index 7833109f2b6..56db68b163c 100644
--- a/source/blender/modifiers/intern/MOD_array.c
+++ b/source/blender/modifiers/intern/MOD_array.c
@@ -306,14 +306,14 @@ static void mesh_merge_transform(Mesh *result,
mul_m4_v3(cap_offset, mv->co);
/* Reset MVert flags for caps */
mv->flag = mv->bweight = 0;
+ }
- /* We have to correct normals too, if we do not tag them as dirty later! */
- if (!recalc_normals_later) {
- float no[3];
- normal_short_to_float_v3(no, mv->no);
- mul_mat3_m4_v3(cap_offset, no);
- normalize_v3(no);
- normal_float_to_short_v3(mv->no, no);
+ /* We have to correct normals too, if we do not tag them as dirty later! */
+ if (!recalc_normals_later) {
+ float(*dst_vert_normals)[3] = BKE_mesh_vertex_normals_for_write(result);
+ for (i = 0; i < cap_nverts; i++) {
+ mul_mat3_m4_v3(cap_offset, dst_vert_normals[cap_verts_index + i]);
+ normalize_v3(dst_vert_normals[cap_verts_index + i]);
}
}
More information about the Bf-blender-cvs
mailing list