Home Website Youtube GitHub

Inconsistent joint orient when mirrored

Hi,
I noticed an inconsistant orientation and behaviour when some guides are mirrored and were wondering how I could edit it with my own preferences.

( A ) On the EPIC_MetaHumanY-up for exemple, you can see the Right side has its X orient pointing the opposite way of the child wich is a behaviour I would like to avoid and have all my bones pointing toward the child bone (like the Left side has). Mgear seems to freeze transform the joint rotation (wich is good) but make the auto editing of orientation afterward impossible.

( B ) In the screen you can see the hands in their non edited configuration having inconsistant behaviour, the left has all the orintation flowing down the arm while the right side has the metacarpal (EPIC_Control_01) going the opposite way.

For a strange reason, only the finger (EPIC_Chain_01) have an option which when checked, make the orient of the joint correct. This option doesn’t seem to be present anywhere else as you can see the forearm is still in the wrong direction. The problem is in the code, this check seems to be linked to the fk_ctl and but change the axis of the control, its changing the axis of the joint.

( C ) Here some exemple of chains acting all differently when mirrored, some are good, some have the same behaviour has the MetaHuman

I manage to have multiple solution in mind and I would like help to realise them :

#1 solution :
The most brute force of them all, changing the Orient offset XYZ of each of the wrong oriented guide. wich mean that every newly mirrored guide need to be put a 180 degres offset to get the right orient? and not every one of them as we saw that the metacarpal and some chain doesn’t have the orient issue.
Is there a way to edit multiple guide at once? via python?
(this thread already cover a bit of the issue and offer the manual editing solution but would like an automatic one)

#2 solution :
The ideal solution : Having a script Orient Joint in the right direction before Mgear performs the freezing of the rotation.
Where do Mgear does the freezing? How can I plug myself inbetween?

#3 solution :
The hacky good solution : Make Mgear avoid the bone freezing and create a post script to duplicate the root hierarchy, perform the Orient Joint, freeze transform and then parent constrain the original joints chain to the newly created one wich will be use to export in unreal and skin.

What do you think of the issue and the solution?

Thanks to anyone giving any second of their life to help me sort out this problem and thanks to the Mgear community and creator for this amazing tool.