diff options
author | Hans Goudey <h.goudey@me.com> | 2020-07-21 16:51:27 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-07-21 16:51:27 +0300 |
commit | d42530824e434fcc4c8d5394dd65f44cf3e8c16f (patch) | |
tree | 434907905bd9335ff9af86cab65149714c8fcc40 /source/blender/editors | |
parent | 6b6e2e742ff4393a73e982e0a3d6dae934ad20f2 (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')
-rw-r--r-- | source/blender/editors/armature/pose_transform.c | 8 |
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; |