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:
Diffstat (limited to 'source/blender/modifiers/intern/MOD_cast.c')
-rw-r--r--source/blender/modifiers/intern/MOD_cast.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/source/blender/modifiers/intern/MOD_cast.c b/source/blender/modifiers/intern/MOD_cast.c
index 5cb352ef482..14b23ba4972 100644
--- a/source/blender/modifiers/intern/MOD_cast.c
+++ b/source/blender/modifiers/intern/MOD_cast.c
@@ -177,10 +177,7 @@ static void sphere_do(
/* 3) if we were given a vertex group name,
* only those vertices should be affected */
- defgrp_index = defgroup_name_index(ob, cmd->defgrp_name);
-
- if ((ob->type == OB_MESH) && dm && defgrp_index >= 0)
- dvert = dm->getVertDataArray(dm, CD_MDEFORMVERT);
+ modifier_get_vgroup(ob, dm, cmd->defgrp_name, &dvert, &defgrp_index);
if(flag & MOD_CAST_SIZE_FROM_RADIUS) {
len = cmd->radius;
@@ -335,10 +332,7 @@ static void cuboid_do(
/* 3) if we were given a vertex group name,
* only those vertices should be affected */
- defgrp_index = defgroup_name_index(ob, cmd->defgrp_name);
-
- if ((ob->type == OB_MESH) && dm && defgrp_index >= 0)
- dvert = dm->getVertDataArray(dm, CD_MDEFORMVERT);
+ modifier_get_vgroup(ob, dm, cmd->defgrp_name, &dvert, &defgrp_index);
if (ctrl_ob) {
if(flag & MOD_CAST_USE_OB_TRANSFORM) {