Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_meshdeform.c
| Show First 20 Lines • Show All 155 Lines • ▼ Show 20 Lines | |||||
| static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphContext *ctx) | static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphContext *ctx) | ||||
| { | { | ||||
| MeshDeformModifierData *mmd = (MeshDeformModifierData *)md; | MeshDeformModifierData *mmd = (MeshDeformModifierData *)md; | ||||
| if (mmd->object != NULL) { | if (mmd->object != NULL) { | ||||
| DEG_add_object_relation(ctx->node, mmd->object, DEG_OB_COMP_TRANSFORM, "Mesh Deform Modifier"); | DEG_add_object_relation(ctx->node, mmd->object, DEG_OB_COMP_TRANSFORM, "Mesh Deform Modifier"); | ||||
| DEG_add_object_relation(ctx->node, mmd->object, DEG_OB_COMP_GEOMETRY, "Mesh Deform Modifier"); | DEG_add_object_relation(ctx->node, mmd->object, DEG_OB_COMP_GEOMETRY, "Mesh Deform Modifier"); | ||||
| } | } | ||||
| /* We need own transformation as well. */ | |||||
| DEG_add_modifier_to_transform_relation(ctx->node, "Mesh Deform Modifier"); | |||||
| } | } | ||||
| static float meshdeform_dynamic_bind(MeshDeformModifierData *mmd, float (*dco)[3], float vec[3]) | static float meshdeform_dynamic_bind(MeshDeformModifierData *mmd, float (*dco)[3], float vec[3]) | ||||
| { | { | ||||
| MDefCell *cell; | MDefCell *cell; | ||||
| MDefInfluence *inf; | MDefInfluence *inf; | ||||
| float gridvec[3], dvec[3], ivec[3], wx, wy, wz; | float gridvec[3], dvec[3], ivec[3], wx, wy, wz; | ||||
| float weight, cageweight, totweight, *cageco; | float weight, cageweight, totweight, *cageco; | ||||
| ▲ Show 20 Lines • Show All 410 Lines • Show Last 20 Lines | |||||