Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2020-07-21 16:51:27 +0300
committerHans Goudey <h.goudey@me.com>2020-07-21 16:51:27 +0300
commitd42530824e434fcc4c8d5394dd65f44cf3e8c16f (patch)
tree434907905bd9335ff9af86cab65149714c8fcc40 /source/blender/editors/armature
parent6b6e2e742ff4393a73e982e0a3d6dae934ad20f2 (diff)
Fix T78994: Clear selected pose doesn't work without animation
It looks like the code left this as a todo, but the basic solution is to add an extra parameter to BKE_bose_rest to check whether bones are selected before reseting them. I also corrected the operator description which said it acted on only selected bones even when there is an option to turn that off. The "act on selected" is generally implied for Blender's operators anyway. Differential Revision: https://developer.blender.org/D8319
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r--source/blender/editors/armature/pose_transform.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/editors/armature/pose_transform.c b/source/blender/editors/armature/pose_transform.c
index 615d59c3154..a6cf8552ca4 100644
--- a/source/blender/editors/armature/pose_transform.c
+++ b/source/blender/editors/armature/pose_transform.c
@@ -1262,10 +1262,8 @@ static int pose_clear_user_transforms_exec(bContext *C, wmOperator *op)
MEM_freeN(dummyPose);
}
else {
- /* no animation, so just reset whole pose to rest pose
- * (cannot just restore for selected though)
- */
- BKE_pose_rest(ob->pose);
+ /* No animation, so just reset to the rest pose. */
+ BKE_pose_rest(ob->pose, only_select);
}
/* notifiers and updates */
@@ -1282,7 +1280,7 @@ void POSE_OT_user_transforms_clear(wmOperatorType *ot)
/* identifiers */
ot->name = "Clear User Transforms";
ot->idname = "POSE_OT_user_transforms_clear";
- ot->description = "Reset pose on selected bones to keyframed state";
+ ot->description = "Reset pose bone transforms to keyframed state";
/* callbacks */
ot->exec = pose_clear_user_transforms_exec;