Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Eagar <joeedh@gmail.com>2021-07-17 10:44:01 +0300
committerJoseph Eagar <joeedh@gmail.com>2021-07-17 10:44:01 +0300
commit7c4eb4f8dbcf5fd98d8b089aa3cd7291b3910357 (patch)
treea3585864d68cc1a2a6b5f0be5da616c7d31cc590 /source/blender/modifiers/intern/MOD_weightvgproximity.c
parent792292e3de00ed758cf4f5b675938b59f4a4cf21 (diff)
parent118803893e65c52c02ed274f7be2d60c668d5b56 (diff)
Merge branch 'master' into temp_bmesh_multires
Diffstat (limited to 'source/blender/modifiers/intern/MOD_weightvgproximity.c')
-rw-r--r--source/blender/modifiers/intern/MOD_weightvgproximity.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c
index b0d2f52f78c..6e78774269a 100644
--- a/source/blender/modifiers/intern/MOD_weightvgproximity.c
+++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c
@@ -468,7 +468,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
/* Check if we can just return the original mesh.
* Must have verts and therefore verts assigned to vgroups to do anything useful!
*/
- if ((numVerts == 0) || BLI_listbase_is_empty(&ctx->object->defbase)) {
+ if ((numVerts == 0) || BLI_listbase_is_empty(&mesh->vertex_group_names)) {
return mesh;
}
@@ -479,11 +479,10 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
}
/* Get vgroup idx from its name. */
- defgrp_index = BKE_object_defgroup_name_index(ob, wmd->defgrp_name);
+ defgrp_index = BKE_id_defgroup_name_index(&mesh->id, wmd->defgrp_name);
if (defgrp_index == -1) {
return mesh;
}
-
const bool has_mdef = CustomData_has_layer(&mesh->vdata, CD_MDEFORMVERT);
/* If no vertices were ever added to an object's vgroup, dvert might be NULL. */
/* As this modifier never add vertices to vgroup, just return. */