diff options
author | Joshua Leung <aligorith@gmail.com> | 2010-03-11 14:15:25 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2010-03-11 14:15:25 +0300 |
commit | 6028470a9cb5410328df0d681582144573bbc781 (patch) | |
tree | 9c804fa2565ec2ca4498f13c5775066084453b89 /source/blender/editors/armature/poseobject.c | |
parent | 69a7060678e96b53548a14f22a83510f4d9edcd0 (diff) |
Motion Paths + Auto-Keying:
Revised the conditions under which motion paths get recalculated after transforms (when auto-keying is enabled). Now, the type of path display does not matter, but rather that the object/bone in question has any paths at all. This makes animating with these a much smoother experience.
Diffstat (limited to 'source/blender/editors/armature/poseobject.c')
-rw-r--r-- | source/blender/editors/armature/poseobject.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c index 0170241c6c2..a162c8eb21a 100644 --- a/source/blender/editors/armature/poseobject.c +++ b/source/blender/editors/armature/poseobject.c @@ -277,19 +277,26 @@ void POSE_OT_paths_calculate (wmOperatorType *ot) void ED_pose_clear_paths(Object *ob) { bPoseChannel *pchan; + short skipped = 0; if ELEM(NULL, ob, ob->pose) return; - /* free the motionpath blocks */ + /* free the motionpath blocks, but also take note of whether we skipped some... */ for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) { - if ((pchan->bone) && (pchan->bone->flag & BONE_SELECTED)) { - if (pchan->mpath) { + if (pchan->mpath) { + if ((pchan->bone) && (pchan->bone->flag & BONE_SELECTED)) { 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; } /* operator callback for this */ |