Fix #32937: cycles missing update when changing scene simplify settings. Note that
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 22 Oct 2012 19:00:15 +0000 (19:00 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 22 Oct 2012 19:00:15 +0000 (19:00 +0000)
DAG_id_tag_update used to be slow to call, but now it just tags and flushes delayed,
so it can be called for every object.

source/blender/makesrna/intern/rna_scene.c

index 4431eb10a823dbb4fd349230b678bb1ece83f6d1..9fb83e8597d628202b6668a4e4d607281808d4cc 100644 (file)
@@ -1216,9 +1216,12 @@ static void object_simplify_update(Object *ob)
        ModifierData *md;
        ParticleSystem *psys;
 
-       for (md = ob->modifiers.first; md; md = md->next)
-               if (ELEM3(md->type, eModifierType_Subsurf, eModifierType_Multires, eModifierType_ParticleSystem))
-                       ob->recalc |= OB_RECALC_DATA | PSYS_RECALC_CHILD;
+       for (md = ob->modifiers.first; md; md = md->next) {
+               if (ELEM3(md->type, eModifierType_Subsurf, eModifierType_Multires, eModifierType_ParticleSystem)) {
+                       ob->recalc |= PSYS_RECALC_CHILD;
+                       DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
+               }
+       }
 
        for (psys = ob->particlesystem.first; psys; psys = psys->next)
                psys->recalc |= PSYS_RECALC_CHILD;