diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-09-20 13:48:28 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-09-25 15:40:05 +0300 |
commit | 4db2a08281f8495421938e0b2f6a802420afba36 (patch) | |
tree | bf5eed46c77864e47f50566a8ffa9162cc07670d /source/blender/editors/animation/anim_motion_paths.c | |
parent | c77a0d7dc62ee1b07ba50cdb3870ad5dbed3450a (diff) |
Motion paths: Refactor, make update range more explicit
Allows to have a higher versatility in the API.
Should be no functional changes.
Diffstat (limited to 'source/blender/editors/animation/anim_motion_paths.c')
-rw-r--r-- | source/blender/editors/animation/anim_motion_paths.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/animation/anim_motion_paths.c b/source/blender/editors/animation/anim_motion_paths.c index 33be56ce870..9d94b14250a 100644 --- a/source/blender/editors/animation/anim_motion_paths.c +++ b/source/blender/editors/animation/anim_motion_paths.c @@ -220,8 +220,8 @@ void animviz_calc_motionpaths(Depsgraph *depsgraph, Main *bmain, Scene *scene, ListBase *targets, - bool restore, - bool current_frame_only) + eAnimvizCalcRange range, + bool restore) { /* sanity check */ if (ELEM(NULL, targets, targets->first)) { @@ -248,7 +248,7 @@ void animviz_calc_motionpaths(Depsgraph *depsgraph, /* Limit frame range if we are updating just the current frame. */ /* set frame values */ int cfra = CFRA; - if (current_frame_only) { + if (range == ANIMVIZ_CALC_RANGE_CURRENT_FRAME) { if (cfra < sfra || cfra > efra) { return; } @@ -308,7 +308,7 @@ void animviz_calc_motionpaths(Depsgraph *depsgraph, efra, efra - sfra + 1); for (CFRA = sfra; CFRA <= efra; CFRA++) { - if (current_frame_only) { + if (range == ANIMVIZ_CALC_RANGE_CURRENT_FRAME) { /* For current frame, only update tagged. */ BKE_scene_graph_update_tagged(depsgraph, bmain); } @@ -326,7 +326,7 @@ void animviz_calc_motionpaths(Depsgraph *depsgraph, * may be a temporary one that works on a subset of the data. * We always have to restore the current frame though. */ CFRA = cfra; - if (!current_frame_only && restore) { + if (range != ANIMVIZ_CALC_RANGE_CURRENT_FRAME && restore) { motionpaths_calc_update_scene(bmain, depsgraph); } |