Page MenuHome

Armature Make/Clear Parent: Only display valid options
Needs ReviewPublic

Authored by Demeter Dzadik (Mets) on Oct 20 2019, 12:25 AM.



In armature edit mode, the Make/Clear Parent operators would in some cases show options that would do nothing.

Clear Parent (Alt+P):

  • "Clear Parent" option always showed up, even when none of the selected bones had a parent.
  • "Disconnect Bone" option always showed up, even when use_connected on all selected bones was already false.

Make Parent (Ctrl+P):

  • "Keep Offset" option didn't show up when all selected bones' parent was already the active bone. This was correct, and this patch tries to make all behaviours consistent with this.
  • "Connected" option always showed up, even when all selected bones' parent was already the active bone, and they all had use_connect set to True.

Diff Detail

rB Blender
make_clear_parent (branched from master)
Build Status
Buildable 5428
Build 5428: arc lint + arc unit

Event Timeline

Demeter Dzadik (Mets) updated this revision to Diff 19129.EditedOct 20 2019, 12:32 AM

no changes, just using Arcanist instead of manual upload, to see the if the "Context not available." thing on phabricator still happens.

(Edit: It doesn't! Why?)

flip Set Parent order for consistency (so Connected/Disconnect is always the 2nd option)

No longer handle case when use_connect=True but parent=NULL. With D6101 that case should no longer be possible.

Ideally the options should be grayed out instead of hidden, but I can't figure out if/how that would be possible.

Edit: I think this would be possible only if these 2 operators with 2 types each would be split up into 4 separate operators?