diff options
author | Joshua Leung <aligorith@gmail.com> | 2011-03-31 05:37:42 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2011-03-31 05:37:42 +0400 |
commit | 077f8520dae0425a481cbe82a3bcba902b93a0b0 (patch) | |
tree | be4a986f59fdf581b25d531610b5d7e1a69526ea /source/blender/editors/armature/poseUtils.c | |
parent | 531d3e410f23115347b4f9304eb99d32c137fe10 (diff) |
Pose Propagate - Further Tweaks:
- Pose Propagate and Pose Sliding tools now work in the same way as
Pose Library previewing, with regards to selections. If some bones are
selected, then only those will be affected. But if no bones are
selected, then the whole rig gets affected.
- Added a "On Selected Markers" option, which only propagates poses to
frames where there's a selected marker. Animators can combine this
with a "select markers whose name contains..." operator to get an
effective way to manage hand-keyed walk cycles, etc.
Diffstat (limited to 'source/blender/editors/armature/poseUtils.c')
-rw-r--r-- | source/blender/editors/armature/poseUtils.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/editors/armature/poseUtils.c b/source/blender/editors/armature/poseUtils.c index 16e84db0ba7..7ade93076e5 100644 --- a/source/blender/editors/armature/poseUtils.c +++ b/source/blender/editors/armature/poseUtils.c @@ -128,7 +128,6 @@ static void fcurves_to_pchan_links_get (ListBase *pfLinks, Object *ob, bAction * /* get sets of F-Curves providing transforms for the bones in the Pose */ -// TODO: separate the inner workings out to another helper func, since we need option of whether to take selected or visible bones... void poseAnim_mapping_get (bContext *C, ListBase *pfLinks, Object *ob, bAction *act) { /* for each Pose-Channel which gets affected, get the F-Curves for that channel @@ -139,6 +138,17 @@ void poseAnim_mapping_get (bContext *C, ListBase *pfLinks, Object *ob, bAction * fcurves_to_pchan_links_get(pfLinks, ob, act, pchan); } CTX_DATA_END; + + /* if no PoseChannels were found, try a second pass, doing visible ones instead + * i.e. if nothing selected, do whole pose + */ + if (pfLinks->first == NULL) { + CTX_DATA_BEGIN(C, bPoseChannel*, pchan, visible_pose_bones) + { + fcurves_to_pchan_links_get(pfLinks, ob, act, pchan); + } + CTX_DATA_END; + } } /* free F-Curve <-> PoseChannel links */ |