diff options
author | Joshua Leung <aligorith@gmail.com> | 2016-02-06 03:04:20 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2016-02-07 03:32:12 +0300 |
commit | 4e3d6725c4b1ac0e554aa5ff1cb6e151029b2d40 (patch) | |
tree | 7f33965d9dd941fee75c80fa8ff99165fc9b1f0c /source/blender/editors/armature | |
parent | 9eca281e880a1359a57bc3dece87dd1f2cf81621 (diff) |
Clear motionpaths for all objects and bones instead of only selected ones
With the old behaviour, it was too easy to get old paths hanging around because you
forgot to go through and select a few bones that still had them.
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r-- | source/blender/editors/armature/pose_edit.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/source/blender/editors/armature/pose_edit.c b/source/blender/editors/armature/pose_edit.c index 0260b604408..9e8028b6cd8 100644 --- a/source/blender/editors/armature/pose_edit.c +++ b/source/blender/editors/armature/pose_edit.c @@ -306,21 +306,18 @@ static void ED_pose_clear_paths(Object *ob) if (ELEM(NULL, ob, ob->pose)) return; - /* free the motionpath blocks, but also take note of whether we skipped some... */ + /* free the motionpath blocks for all bones - This is easier for users to quickly clear all */ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { if (pchan->mpath) { - if ((pchan->bone) && (pchan->bone->flag & BONE_SELECTED)) { + if (pchan->bone) { animviz_free_motionpath(pchan->mpath); pchan->mpath = NULL; } - else - skipped = 1; } } - /* if we didn't skip any, we shouldn't have any paths left */ - if (skipped == 0) - ob->pose->avs.path_bakeflag &= ~MOTIONPATH_BAKE_HAS_PATHS; + /* no paths left!*/ + ob->pose->avs.path_bakeflag &= ~MOTIONPATH_BAKE_HAS_PATHS; } /* operator callback for this */ @@ -346,7 +343,7 @@ void POSE_OT_paths_clear(wmOperatorType *ot) /* identifiers */ ot->name = "Clear Bone Paths"; ot->idname = "POSE_OT_paths_clear"; - ot->description = "Clear path caches for selected bones"; + ot->description = "Clear path caches for all bones"; /* api callbacks */ ot->exec = pose_clear_paths_exec; |