Page MenuHome

Fix T78994: Clear pose transforms resets all poses even with only_selected
ClosedPublic

Authored by Hans Goudey (HooglyBoogly) on Jul 16 2020, 10:26 PM.

Details

Summary

It looks like the code left this as a todo, but the basic solution is to just 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.

Fixes T78994

Diff Detail

Repository
rB Blender

Event Timeline

Hans Goudey (HooglyBoogly) requested review of this revision.Jul 16 2020, 10:26 PM
Sybren A. Stüvel (sybren) requested changes to this revision.Jul 17 2020, 12:00 PM

Thanks for the patch, LGTM except a few small things.

source/blender/blenkernel/intern/action.c
1515–1518

The comment ("the pose") and the implementation ("maybe not all of the pose") are out of sync.

Give the state of the comment, I'd say just rewrite it. "Now also ..." doesn't make much sense, and neither does "for do_all_pose_actions" (there is no mention of "do_all_pose_actions" anywhere else in the code).

1515–1518

It's unclear what selected_only refers to. selected_bones_only seems better to me.

1530

Parentheses are unnecessary here.

This revision now requires changes to proceed.Jul 17 2020, 12:00 PM
Hans Goudey (HooglyBoogly) marked 2 inline comments as done.Jul 17 2020, 9:24 PM
Hans Goudey (HooglyBoogly) added inline comments.
source/blender/blenkernel/intern/action.c
1530

Right, I usually do that just to make it more readable, but I don't feel strongly about it.

Hans Goudey (HooglyBoogly) marked an inline comment as done.
  • Review feedback
This revision is now accepted and ready to land.Jul 21 2020, 2:36 PM