Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_hook.c
| Show First 20 Lines • Show All 242 Lines • ▼ Show 20 Lines | if (fac) { | ||||
| float co_tmp[3]; | float co_tmp[3]; | ||||
| mul_v3_m4v3(co_tmp, hd->mat, co); | mul_v3_m4v3(co_tmp, hd->mat, co); | ||||
| interp_v3_v3v3(co, co, co_tmp, fac); | interp_v3_v3v3(co, co, co_tmp, fac); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| static void deformVerts_do( | static void deformVerts_do( | ||||
| HookModifierData *hmd, const ModifierEvalContext *ctx, | HookModifierData *hmd, const ModifierEvalContext *UNUSED(ctx), | ||||
| Object *ob, Mesh *mesh, | Object *ob, Mesh *mesh, | ||||
| float (*vertexCos)[3], int numVerts) | float (*vertexCos)[3], int numVerts) | ||||
| { | { | ||||
| Object *ob_target = DEG_get_evaluated_object(ctx->depsgraph, hmd->object); | Object *ob_target = hmd->object; | ||||
| bPoseChannel *pchan = BKE_pose_channel_find_name(ob_target->pose, hmd->subtarget); | bPoseChannel *pchan = BKE_pose_channel_find_name(ob_target->pose, hmd->subtarget); | ||||
| float dmat[4][4]; | float dmat[4][4]; | ||||
| int i, *index_pt; | int i, *index_pt; | ||||
| struct HookData_cb hd; | struct HookData_cb hd; | ||||
| if (hmd->curfalloff == NULL) { | if (hmd->curfalloff == NULL) { | ||||
| /* should never happen, but bad lib linking could cause it */ | /* should never happen, but bad lib linking could cause it */ | ||||
| hmd->curfalloff = curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); | hmd->curfalloff = curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); | ||||
| ▲ Show 20 Lines • Show All 149 Lines • Show Last 20 Lines | |||||