[Bf-blender-cvs] [72729e4e7ed] temp-vert-normals-cleanup: Displace modifier: Limit normal calculation to the normal displacement case
Hans Goudey
noreply at git.blender.org
Sat Dec 11 19:02:54 CET 2021
Commit: 72729e4e7edf7ffe8345ba445bf450b09e70dca5
Author: Hans Goudey
Date: Sat Dec 11 12:02:45 2021 -0600
Branches: temp-vert-normals-cleanup
https://developer.blender.org/rB72729e4e7edf7ffe8345ba445bf450b09e70dca5
Displace modifier: Limit normal calculation to the normal displacement case
===================================================================
M source/blender/modifiers/intern/MOD_displace.c
===================================================================
diff --git a/source/blender/modifiers/intern/MOD_displace.c b/source/blender/modifiers/intern/MOD_displace.c
index 7749aa481d3..010292d2ebb 100644
--- a/source/blender/modifiers/intern/MOD_displace.c
+++ b/source/blender/modifiers/intern/MOD_displace.c
@@ -361,7 +361,9 @@ static void displaceModifier_do(DisplaceModifierData *dmd,
data.vertexCos = vertexCos;
copy_m4_m4(data.local_mat, local_mat);
data.mvert = mvert;
- data.vert_normals = BKE_mesh_vertex_normals_ensure(mesh);
+ if (direction == MOD_DISP_DIR_NOR) {
+ data.vert_normals = BKE_mesh_vertex_normals_ensure(mesh);
+ }
data.vert_clnors = vert_clnors;
if (tex_target != NULL) {
data.pool = BKE_image_pool_new();
More information about the Bf-blender-cvs
mailing list