Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_cloth.c
| Show First 20 Lines • Show All 119 Lines • ▼ Show 20 Lines | static void deformVerts(ModifierData *md, | ||||
| BKE_id_free(NULL, mesh_src); | BKE_id_free(NULL, mesh_src); | ||||
| } | } | ||||
| static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphContext *ctx) | static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphContext *ctx) | ||||
| { | { | ||||
| ClothModifierData *clmd = (ClothModifierData *)md; | ClothModifierData *clmd = (ClothModifierData *)md; | ||||
| if (clmd != NULL) { | if (clmd != NULL) { | ||||
| if (clmd->coll_parms->flags & CLOTH_COLLSETTINGS_FLAG_ENABLED) { | |||||
| DEG_add_collision_relations(ctx->node, | DEG_add_collision_relations(ctx->node, | ||||
| ctx->object, | ctx->object, | ||||
| clmd->coll_parms->group, | clmd->coll_parms->group, | ||||
| eModifierType_Collision, | eModifierType_Collision, | ||||
| NULL, | NULL, | ||||
| "Cloth Collision"); | "Cloth Collision"); | ||||
| } | |||||
| DEG_add_forcefield_relations( | DEG_add_forcefield_relations( | ||||
| ctx->node, ctx->object, clmd->sim_parms->effector_weights, true, 0, "Cloth Field"); | ctx->node, ctx->object, clmd->sim_parms->effector_weights, true, 0, "Cloth Field"); | ||||
| } | } | ||||
| DEG_add_modifier_to_transform_relation(ctx->node, "Cloth Modifier"); | DEG_add_modifier_to_transform_relation(ctx->node, "Cloth Modifier"); | ||||
| } | } | ||||
| static void requiredDataMask(Object *UNUSED(ob), | static void requiredDataMask(Object *UNUSED(ob), | ||||
| ModifierData *md, | ModifierData *md, | ||||
| ▲ Show 20 Lines • Show All 136 Lines • Show Last 20 Lines | |||||