Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-06-10 17:07:02 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-06-10 17:07:02 +0400
commit4863feb95640bffa0a2c250f1b9da13100643fd2 (patch)
treea8063e3ac241cd1917b38671f45109d5c50fd60c /source/blender/blenkernel/intern/mask.c
parent183629b451902e32c4840864da55bc3c055fd393 (diff)
Changes to mask evaluation
- BKE_mask_update_scene was only used with do_newframe=FALSE, removed this argument. - Made it so BKE_mask_update_scene is able to handle LIB_ID_RECALC_DATA case. Namely, if mask ID is tagged for data update it means shapekeys will be re-evaluated (as if do_newframe=true). If mask id only tagged for LIB_ID_RECALC, then no shapekey evaluation happens (same as it used to behave before). This means, doing DAG_id_tag_update(&mask->id, OB_RECALC_DATA) will lead to shapekeys re-evaluation which is really needed in such operators as clearing shapekeys (and cleaning shapekeys which is in tomato branch yet). This is a bit silly to use OB_RECALC_DATA sine mask is not an OB, but could not see better way to do it now. This fixes missing mask re-evaluation after clearing shapekey, would expect no other functional changes.
Diffstat (limited to 'source/blender/blenkernel/intern/mask.c')
-rw-r--r--source/blender/blenkernel/intern/mask.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/mask.c b/source/blender/blenkernel/intern/mask.c
index 68500549539..b3c5ceefb2d 100644
--- a/source/blender/blenkernel/intern/mask.c
+++ b/source/blender/blenkernel/intern/mask.c
@@ -1525,13 +1525,14 @@ void BKE_mask_evaluate_all_masks(Main *bmain, float ctime, const int do_newframe
}
}
-void BKE_mask_update_scene(Main *bmain, Scene *scene, const int do_newframe)
+void BKE_mask_update_scene(Main *bmain, Scene *scene)
{
Mask *mask;
for (mask = bmain->mask.first; mask; mask = mask->id.next) {
- if (mask->id.flag & LIB_ID_RECALC) {
- BKE_mask_evaluate_all_masks(bmain, CFRA, do_newframe);
+ if (mask->id.flag & (LIB_ID_RECALC | LIB_ID_RECALC_DATA)) {
+ bool do_new_frame = (mask->id.flag & LIB_ID_RECALC_DATA) != 0;
+ BKE_mask_evaluate_all_masks(bmain, CFRA, do_new_frame);
}
}
}