From 31f0c27ae7d6f45cfde71cca8c4f791a089452a5 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 12 May 2015 13:29:00 +0500 Subject: Depsgraph: Add additional relations/id update tags This calls are not strictly speaking needed for the old dependency graph, but due to more granular nature of upcoming depsgraph more actions requires update of relations of IDs. On the one hand this extra tags could be wrapped with if() statements, but on the other hand it makes sense to keep tag in sync so it's clear if some issue is caused by missing/extra tag or by depsgraph itself. --- source/blender/editors/object/object_modifier.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/object/object_modifier.c') diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index 1cee54c33fa..c88f1257936 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -152,10 +152,10 @@ ModifierData *ED_object_modifier_add(ReportList *reports, Main *bmain, Scene *sc ob->pd = object_add_collision_fields(0); ob->pd->deflect = 1; - DAG_relations_tag_update(bmain); } - else if (type == eModifierType_Surface) - DAG_relations_tag_update(bmain); + else if (type == eModifierType_Surface) { + /* pass */ + } else if (type == eModifierType_Multires) { /* set totlvl from existing MDISPS layer if object already had it */ multiresModifier_set_levels_from_disps((MultiresModifierData *)new_md, ob); @@ -172,6 +172,7 @@ ModifierData *ED_object_modifier_add(ReportList *reports, Main *bmain, Scene *sc } DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + DAG_relations_tag_update(bmain); return new_md; } @@ -319,6 +320,8 @@ static bool object_modifier_remove(Main *bmain, Object *ob, ModifierData *md, ob->mode &= ~OB_MODE_PARTICLE_EDIT; } + DAG_relations_tag_update(bmain); + BLI_remlink(&ob->modifiers, md); modifier_free(md); -- cgit v1.2.3