From ba5b792dd997d634c0901bddbca4ebb82d6ebbbe Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 5 Apr 2017 11:11:44 +0200 Subject: Depsgraph: Remove all layer bit flags related checks These bits became obsolete with the new layer system, so we can simplify some code around them or avoid existing workarounds which were trying to keep things working for them. There are still work needed to be done for on_visible_change to avoid unnecessary updates, but that can also happen later. --- source/blender/modifiers/intern/MOD_cloth.c | 2 +- source/blender/modifiers/intern/MOD_dynamicpaint.c | 2 +- source/blender/modifiers/intern/MOD_smoke.c | 4 ++-- source/blender/modifiers/intern/MOD_softbody.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'source/blender/modifiers') diff --git a/source/blender/modifiers/intern/MOD_cloth.c b/source/blender/modifiers/intern/MOD_cloth.c index 59eb00207df..c5ab97b5ccd 100644 --- a/source/blender/modifiers/intern/MOD_cloth.c +++ b/source/blender/modifiers/intern/MOD_cloth.c @@ -126,7 +126,7 @@ static void updateDepsgraph(ModifierData *md, ClothModifierData *clmd = (ClothModifierData *)md; if (clmd != NULL) { /* Actual code uses get_collisionobjects */ - DEG_add_collision_relations(node, scene, ob, clmd->coll_parms->group, ob->lay|scene->lay, eModifierType_Collision, NULL, true, "Cloth Collision"); + DEG_add_collision_relations(node, scene, ob, clmd->coll_parms->group, eModifierType_Collision, NULL, true, "Cloth Collision"); DEG_add_forcefield_relations(node, scene, ob, clmd->sim_parms->effector_weights, true, 0, "Cloth Field"); } diff --git a/source/blender/modifiers/intern/MOD_dynamicpaint.c b/source/blender/modifiers/intern/MOD_dynamicpaint.c index 9eb3e673f27..a3e25575a8a 100644 --- a/source/blender/modifiers/intern/MOD_dynamicpaint.c +++ b/source/blender/modifiers/intern/MOD_dynamicpaint.c @@ -134,7 +134,7 @@ static void updateDepsgraph(ModifierData *md, } /* Actual code uses custom loop over group/scene without layer checks in dynamicPaint_doStep */ - DEG_add_collision_relations(node, scene, ob, surface->brush_group, -1, eModifierType_DynamicPaint, is_brush_cb, false, "Dynamic Paint Brush"); + DEG_add_collision_relations(node, scene, ob, surface->brush_group, eModifierType_DynamicPaint, is_brush_cb, false, "Dynamic Paint Brush"); } } } diff --git a/source/blender/modifiers/intern/MOD_smoke.c b/source/blender/modifiers/intern/MOD_smoke.c index 8ba39819b5e..5912de9948c 100644 --- a/source/blender/modifiers/intern/MOD_smoke.c +++ b/source/blender/modifiers/intern/MOD_smoke.c @@ -139,8 +139,8 @@ static void updateDepsgraph(ModifierData *md, if (smd && (smd->type & MOD_SMOKE_TYPE_DOMAIN) && smd->domain) { /* Actual code uses get_collisionobjects */ - DEG_add_collision_relations(node, scene, ob, smd->domain->fluid_group, ob->lay|scene->lay, eModifierType_Smoke, is_flow_cb, true, "Smoke Flow"); - DEG_add_collision_relations(node, scene, ob, smd->domain->coll_group, ob->lay|scene->lay, eModifierType_Smoke, is_coll_cb, true, "Smoke Coll"); + DEG_add_collision_relations(node, scene, ob, smd->domain->fluid_group, eModifierType_Smoke, is_flow_cb, true, "Smoke Flow"); + DEG_add_collision_relations(node, scene, ob, smd->domain->coll_group, eModifierType_Smoke, is_coll_cb, true, "Smoke Coll"); DEG_add_forcefield_relations(node, scene, ob, smd->domain->effector_weights, true, PFIELD_SMOKEFLOW, "Smoke Force Field"); } diff --git a/source/blender/modifiers/intern/MOD_softbody.c b/source/blender/modifiers/intern/MOD_softbody.c index 412f0a3ce53..c5f984adb71 100644 --- a/source/blender/modifiers/intern/MOD_softbody.c +++ b/source/blender/modifiers/intern/MOD_softbody.c @@ -70,7 +70,7 @@ static void updateDepsgraph(ModifierData *UNUSED(md), { if (ob->soft) { /* Actual code uses ccd_build_deflector_hash */ - DEG_add_collision_relations(node, scene, ob, ob->soft->collision_group, ob->lay, eModifierType_Collision, NULL, false, "Softbody Collision"); + DEG_add_collision_relations(node, scene, ob, ob->soft->collision_group, eModifierType_Collision, NULL, false, "Softbody Collision"); DEG_add_forcefield_relations(node, scene, ob, ob->soft->effector_weights, true, 0, "Softbody Field"); } -- cgit v1.2.3