[Bf-blender-cvs] [d085928f4b9] temp-lanpr-cleanup: Fix T70101: Displace modifier handles empty vertex group incorrectly
Jacques Lucke
noreply at git.blender.org
Wed Sep 25 03:48:45 CEST 2019
Commit: d085928f4b9aedc0a8a7f66942616cddfb3d093e
Author: Jacques Lucke
Date: Fri Sep 20 10:41:29 2019 +0200
Branches: temp-lanpr-cleanup
https://developer.blender.org/rBd085928f4b9aedc0a8a7f66942616cddfb3d093e
Fix T70101: Displace modifier handles empty vertex group incorrectly
===================================================================
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 ac0d72214c8..9cb694be88b 100644
--- a/source/blender/modifiers/intern/MOD_displace.c
+++ b/source/blender/modifiers/intern/MOD_displace.c
@@ -294,6 +294,11 @@ static void displaceModifier_do(DisplaceModifierData *dmd,
mvert = mesh->mvert;
MOD_get_vgroup(ob, mesh, dmd->defgrp_name, &dvert, &defgrp_index);
+ if (defgrp_index >= 0 && dvert == NULL) {
+ /* There is a vertex group, but it has no vertices. */
+ return;
+ }
+
Tex *tex_target = dmd->texture;
if (tex_target != NULL) {
tex_co = MEM_calloc_arrayN((size_t)numVerts, sizeof(*tex_co), "displaceModifier_do tex_co");
More information about the Bf-blender-cvs
mailing list