From 077f8520dae0425a481cbe82a3bcba902b93a0b0 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Thu, 31 Mar 2011 01:37:42 +0000 Subject: 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. --- source/blender/editors/armature/poseUtils.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/armature/poseUtils.c') 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 */ -- cgit v1.2.3