Page MenuHome

Fix T65671: Armature X-Mirror inconsistencies
AcceptedPublic

Authored by Demeter Dzadik (Mets) on Sat, Aug 3, 12:13 PM.

Details

Summary

This is my first patch, be nice.
This is only for fixing edit mode X-Mirror. I'd also like to fix pose mode X-mirror, but I didn't want my first patch to be too big. Therefore this is only a partial fix for T65671.

I also don't know for sure if I'm adding all the appropriate update functions in all the appropriate circumstances using RNA_def_property_update(). But everything seems to work fine when I'm playing with it.

Thanks to @Jacques Lucke (JacquesLucke) for his video! :)

Slightly long video showing the fix in action:

Diff Detail

Repository
rB Blender
Branch
arcpatch-D5408 (branched from master)
Build Status
Buildable 4393
Build 4393: arc lint + arc unit

Event Timeline

Demeter Dzadik (Mets) edited the summary of this revision. (Show Details)Sat, Aug 3, 12:14 PM
Demeter Dzadik (Mets) edited the summary of this revision. (Show Details)
Demeter Dzadik (Mets) edited the summary of this revision. (Show Details)Sat, Aug 3, 12:22 PM
Demeter Dzadik (Mets) updated this revision to Diff 16817.EditedSat, Aug 3, 5:51 PM

Un-removed check_select

I understand now what check_select was for :) Without it, the entire armature would get mirrored when a transform operator was used(eg. from the 3d viewport) And also the tail would be mirrored when only the head is moved, and vice versa.

There are still some issues in this area, namely that when a value is changed via the UI value sliders or python, the entire bone gets mirrored no matter what, instead of just that value, and also cancelling a slider drag will not reset the mirrored bone correctly. This is not a regression, it's a separate bug that always existed.

Demeter Dzadik (Mets) edited the summary of this revision. (Show Details)Sat, Aug 3, 8:07 PM
Demeter Dzadik (Mets) edited the summary of this revision. (Show Details)Sun, Aug 4, 11:24 AM

Bone roll was not being mirrored when head or tail is moved. It needs to always be mirrored.
+ Some commenting and cleanup

Brecht Van Lommel (brecht) requested changes to this revision.Mon, Aug 12, 10:15 AM

There is a non-obvious thing here. Changing the bone segments requires a dependency graph rebuild in pose mode (rna_Armature_dependency_update), but it does not in edit mode so this is ok as is.

source/blender/editors/armature/armature_utils.c
442–444
461

This is redundant.

This revision now requires changes to proceed.Mon, Aug 12, 10:15 AM
Demeter Dzadik (Mets) updated this revision to Diff 17060.EditedTue, Aug 13, 1:16 AM
  • Cleaned up commenting, hope it adheres to convention now, but let me know if it doesn't.
  • Removed redundant if statement
  • Fixed head radius mirroring was not being cancelled correctly. (This was always like this)
Demeter Dzadik (Mets) marked 2 inline comments as done.Tue, Aug 13, 1:22 AM
This revision is now accepted and ready to land.Tue, Aug 13, 5:59 AM