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/transform/transform_convert.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/transform/transform_convert.c')
-rw-r--r-- | source/blender/editors/transform/transform_convert.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/transform/transform_convert.c b/source/blender/editors/transform/transform_convert.c index 67bb132972e..81b7c7f8c9e 100644 --- a/source/blender/editors/transform/transform_convert.c +++ b/source/blender/editors/transform/transform_convert.c @@ -2237,9 +2237,10 @@ void special_aftertrans_update(bContext *C, TransInfo *t) /* Update motion paths once for all transformed bones in an object. */ GSetIterator gs_iter; GSET_ITER (gs_iter, motionpath_updates) { - bool current_frame_only = canceled; + const ePosePathCalcRange range = canceled ? POSE_PATH_CALC_RANGE_CURRENT_FRAME : + POSE_PATH_CALC_RANGE_CHANGED; ob = BLI_gsetIterator_getKey(&gs_iter); - ED_pose_recalculate_paths(C, t->scene, ob, current_frame_only); + ED_pose_recalculate_paths(C, t->scene, ob, range); } BLI_gset_free(motionpath_updates, NULL); } @@ -2320,8 +2321,9 @@ void special_aftertrans_update(bContext *C, TransInfo *t) if (motionpath_update) { /* Update motion paths once for all transformed objects. */ - bool current_frame_only = canceled; - ED_objects_recalculate_paths(C, t->scene, current_frame_only); + const eObjectPathCalcRange range = canceled ? OBJECT_PATH_CALC_RANGE_CURRENT_FRAME : + OBJECT_PATH_CALC_RANGE_CHANGED; + ED_objects_recalculate_paths(C, t->scene, range); } } |