Home Website Youtube GitHub

Mirror/Flip not working with References/Namespaces

Maya 2023.3, Win 11, mGear 4.3.0

Hello, mGear newbie here. When I try to Flip or Mirror controls on a referenced rig I get this error:

select -r TestRig:leg_L0_ik_ctl ;
# Warning: Flip/Mirror pose fail
# Warning: If you are using Custom naming rules in controls. It is possible that the name configuration makes hard to track the correct object to mirror for TestRig:leg_L0_ik_ctl
# Traceback (most recent call last):
# #   File "C:\Users\username\OneDrive\Documents\maya\2023\modules\scripts\mgear\core\anim_utils.py", line 1323, in mirrorPose
    target = getMirrorTarget(nameSpace, oSel)
# #   File "C:\Users\username\OneDrive\Documents\maya\2023\modules\scripts\mgear\core\anim_utils.py", line 1292, in getMirrorTarget
    nameParts = swapSideLabelNode(nameParts)
# #   File "C:\Users\username\OneDrive\Documents\maya\2023\modules\scripts\mgear\core\anim_utils.py", line 144, in swapSideLabelNode
    node = pm.PyNode(node)
# #   File "C:\Program Files\Autodesk\Maya2023\Python\lib\site-packages\pymel\core\general.py", line 2788, in __new__
    raise _objectError(name)
# pymel.core.general.MayaNodeError: Maya Node does not exist (or is not unique):: 'leg_L0_ik_ctl'
Maya Node does not exist (or is not unique):: 'leg_L0_ik_ctl'

Looks like the namespace is not taken into account, if I delete the namespace or check the “Namespace Editor/Options/Relative Namespaces” checkbox, I can work around the problem. Flip/Mirror works fine in the rig file itself.

Glancing at “mirrorPose()” in “anim_utils.py” I see that it should handle namespaces, obviously it is not working in my case. Could this be something wrong with my setup/preferences? I couldn’t find anyone talking about this issue.

Thanks in advance!