diff options
author | Joshua Leung <aligorith@gmail.com> | 2010-07-05 07:55:28 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2010-07-05 07:55:28 +0400 |
commit | faf1c9a4bb27dfdd843cc745707d15ab47ce8683 (patch) | |
tree | f57e5bdca9359ff2b80c02f3cf0053b9842b55ca /source/blender/makesrna/intern/rna_object_force.c | |
parent | 02b0188c163343cf1e21123b33cf98d3beb606c2 (diff) |
Bugfix #22685: Screen update slow, animation player ALT-A, files created with 2.4x
Modifiers were being mistakenly recalculated at every frame as long as the object had animation, slowing things down due to incorrect depsgraph recalc tags.
Renamed OB_RECALC -> OB_RECALC_ALL to reduce future confusion. During this process, I noticed a few dubious usages of OB_RECALC, so it's best to use this commit as a guide of places to check on. Apart from the place responsible for this bug, I haven't changed any OB_RECALC -> OB_RECALC_OB/DATA in case that introduces more unforseen bugs now, making it more difficult to track the problems later (rename + value change can be confusing to identify the genuine typos).
Diffstat (limited to 'source/blender/makesrna/intern/rna_object_force.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_object_force.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c index ec1f1bf164e..97c429209de 100644 --- a/source/blender/makesrna/intern/rna_object_force.c +++ b/source/blender/makesrna/intern/rna_object_force.c @@ -459,7 +459,7 @@ static void rna_FieldSettings_update(Main *bmain, Scene *scene, PointerRNA *ptr) part->pd2->tex= 0; } - DAG_id_flush_update(&part->id, OB_RECALC|PSYS_RECALC_RESET); + DAG_id_flush_update(&part->id, OB_RECALC_ALL|PSYS_RECALC_RESET); WM_main_add_notifier(NC_OBJECT|ND_DRAW, NULL); } @@ -501,7 +501,7 @@ static void rna_FieldSettings_shape_update(Main *bmain, Scene *scene, PointerRNA static void rna_FieldSettings_dependency_update(Main *bmain, Scene *scene, PointerRNA *ptr) { if(particle_id_check(ptr)) { - DAG_id_flush_update((ID*)ptr->id.data, OB_RECALC|PSYS_RECALC_RESET); + DAG_id_flush_update((ID*)ptr->id.data, OB_RECALC_ALL|PSYS_RECALC_RESET); } else { Object *ob= (Object*)ptr->id.data; @@ -518,7 +518,7 @@ static void rna_FieldSettings_dependency_update(Main *bmain, Scene *scene, Point DAG_scene_sort(scene); if(ob->type == OB_CURVE && ob->pd->forcefield == PFIELD_GUIDE) - DAG_id_flush_update(&ob->id, OB_RECALC); + DAG_id_flush_update(&ob->id, OB_RECALC_ALL); else DAG_id_flush_update(&ob->id, OB_RECALC_OB); @@ -628,7 +628,7 @@ static void rna_CollisionSettings_update(Main *bmain, Scene *scene, PointerRNA * { Object *ob= (Object*)ptr->id.data; - DAG_id_flush_update(&ob->id, OB_RECALC); + DAG_id_flush_update(&ob->id, OB_RECALC_ALL); WM_main_add_notifier(NC_OBJECT|ND_DRAW, ob); } |