Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_mask.c
| Show First 20 Lines • Show All 121 Lines • ▼ Show 20 Lines | static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mesh *mesh) | ||||
| if (!(ELEM(mmd->mode, MOD_MASK_MODE_ARM, MOD_MASK_MODE_VGROUP)) || | if (!(ELEM(mmd->mode, MOD_MASK_MODE_ARM, MOD_MASK_MODE_VGROUP)) || | ||||
| (maxVerts == 0) || BLI_listbase_is_empty(&ob->defbase)) | (maxVerts == 0) || BLI_listbase_is_empty(&ob->defbase)) | ||||
| { | { | ||||
| return mesh; | return mesh; | ||||
| } | } | ||||
| /* if mode is to use selected armature bones, aggregate the bone groups */ | /* if mode is to use selected armature bones, aggregate the bone groups */ | ||||
| if (mmd->mode == MOD_MASK_MODE_ARM) { /* --- using selected bones --- */ | if (mmd->mode == MOD_MASK_MODE_ARM) { /* --- using selected bones --- */ | ||||
| Object *oba = DEG_get_evaluated_object(ctx->depsgraph, mmd->ob_arm); | Object *oba = mmd->ob_arm; | ||||
| bPoseChannel *pchan; | bPoseChannel *pchan; | ||||
| bDeformGroup *def; | bDeformGroup *def; | ||||
| bool *bone_select_array; | bool *bone_select_array; | ||||
| int bone_select_tot = 0; | int bone_select_tot = 0; | ||||
| const int defbase_tot = BLI_listbase_count(&ob->defbase); | const int defbase_tot = BLI_listbase_count(&ob->defbase); | ||||
| /* check that there is armature object with bones to use, otherwise return original mesh */ | /* check that there is armature object with bones to use, otherwise return original mesh */ | ||||
| if (ELEM(NULL, oba, oba->pose, ob->defbase.first)) { | if (ELEM(NULL, oba, oba->pose, ob->defbase.first)) { | ||||
| ▲ Show 20 Lines • Show All 245 Lines • Show Last 20 Lines | |||||