Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_cloth.c
| Show First 20 Lines • Show All 121 Lines • ▼ Show 20 Lines | static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphContext *ctx) | ||||
| ClothModifierData *clmd = (ClothModifierData *)md; | ClothModifierData *clmd = (ClothModifierData *)md; | ||||
| if (clmd != NULL) { | if (clmd != NULL) { | ||||
| DEG_add_collision_relations(ctx->node, ctx->object, clmd->coll_parms->group, eModifierType_Collision, NULL, "Cloth Collision"); | DEG_add_collision_relations(ctx->node, ctx->object, clmd->coll_parms->group, eModifierType_Collision, NULL, "Cloth Collision"); | ||||
| DEG_add_forcefield_relations(ctx->node, ctx->object, clmd->sim_parms->effector_weights, true, 0, "Cloth Field"); | DEG_add_forcefield_relations(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 CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md) | static void requiredDataMask(Object *UNUSED(ob), ModifierData *md, CustomData_MeshMasks *r_cddata_masks) | ||||
| { | { | ||||
| CustomDataMask dataMask = 0; | |||||
| ClothModifierData *clmd = (ClothModifierData *)md; | ClothModifierData *clmd = (ClothModifierData *)md; | ||||
| if (cloth_uses_vgroup(clmd)) | if (cloth_uses_vgroup(clmd)) { | ||||
| dataMask |= CD_MASK_MDEFORMVERT; | r_cddata_masks->vmask |= CD_MASK_MDEFORMVERT; | ||||
| } | |||||
| if (clmd->sim_parms->shapekey_rest != 0) | |||||
| dataMask |= CD_MASK_CLOTH_ORCO; | |||||
| return dataMask; | if (clmd->sim_parms->shapekey_rest != 0) { | ||||
| r_cddata_masks->vmask |= CD_MASK_CLOTH_ORCO; | |||||
| } | |||||
| } | } | ||||
| static void copyData(const ModifierData *md, ModifierData *target, const int flag) | static void copyData(const ModifierData *md, ModifierData *target, const int flag) | ||||
| { | { | ||||
| const ClothModifierData *clmd = (const ClothModifierData *) md; | const ClothModifierData *clmd = (const ClothModifierData *) md; | ||||
| ClothModifierData *tclmd = (ClothModifierData *) target; | ClothModifierData *tclmd = (ClothModifierData *) target; | ||||
| if (tclmd->sim_parms) { | if (tclmd->sim_parms) { | ||||
| ▲ Show 20 Lines • Show All 118 Lines • Show Last 20 Lines | |||||