Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_dynamicpaint.c
| Show First 20 Lines • Show All 117 Lines • ▼ Show 20 Lines | static bool is_brush_cb(Object *UNUSED(ob), ModifierData *md) | ||||
| return (pmd->brush != NULL && pmd->type == MOD_DYNAMICPAINT_TYPE_BRUSH); | return (pmd->brush != NULL && pmd->type == MOD_DYNAMICPAINT_TYPE_BRUSH); | ||||
| } | } | ||||
| static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphContext *ctx) | static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphContext *ctx) | ||||
| { | { | ||||
| DynamicPaintModifierData *pmd = (DynamicPaintModifierData *)md; | DynamicPaintModifierData *pmd = (DynamicPaintModifierData *)md; | ||||
| /* Add relation from canvases to all brush objects. */ | /* Add relation from canvases to all brush objects. */ | ||||
| if (pmd->canvas != NULL && pmd->type == MOD_DYNAMICPAINT_TYPE_CANVAS) { | if (pmd->canvas != NULL && pmd->type == MOD_DYNAMICPAINT_TYPE_CANVAS) { | ||||
| for (DynamicPaintSurface *surface = pmd->canvas->surfaces.first; surface; | LISTBASE_FOREACH (DynamicPaintSurface *, surface, &pmd->canvas->surfaces) { | ||||
| surface = surface->next) { | |||||
| if (surface->effect & MOD_DPAINT_EFFECT_DO_DRIP) { | if (surface->effect & MOD_DPAINT_EFFECT_DO_DRIP) { | ||||
| DEG_add_forcefield_relations( | DEG_add_forcefield_relations( | ||||
| ctx->node, ctx->object, surface->effector_weights, true, 0, "Dynamic Paint Field"); | ctx->node, ctx->object, surface->effector_weights, true, 0, "Dynamic Paint Field"); | ||||
| } | } | ||||
| /* Actual code uses custom loop over group/scene | /* Actual code uses custom loop over group/scene | ||||
| * without layer checks in dynamicPaint_doStep. */ | * without layer checks in dynamicPaint_doStep. */ | ||||
| DEG_add_collision_relations(ctx->node, | DEG_add_collision_relations(ctx->node, | ||||
| ▲ Show 20 Lines • Show All 68 Lines • Show Last 20 Lines | |||||