Home Website Youtube GitHub

Mirroring, replacing, and generally altering controls in shifter is broken

I’ve noticed that mirroring controls/replacing shapes messes with the metadata and will end up duplicating the shape without replacing it. This is messing up hierarchies and ends up breaking entire chains, and in my most recent case the entire rig. I’ve also noticed that using any control not created inside mgear will break the rig as well.

Can you give more details? What version of mGear? What version of Maya? And look at the script editor output. If it isn’t finishing the operation, there is a good chance there is a warning or error.

In what way are you “using” the control? And what “breaks”?

If you are trying to mirror or replace while both the guides and rig are in the scene, perhaps you are getting a duplicate name error.

i rolled back to mgear 4.2.2 because 5.0 wasn’t very stable for me when I updated to it. I’m in maya 2023.3

When I use replace shape or mirror controls, I get this error on about 25% of the controls. Specifically controls on IK chains.

This is trying to mirror the right shoulder to the left shoulder:

# Traceback (most recent call last):
#   File "(my path to mirror_controls.py), line 161, in mirror_button_pressed
#     self.func.mirror_selection()
#   File "(my path to mirror_controls.py)", line 105, in mirror_selection
#     self.mirror_pairs(pairs)
#   (my path to mirror_controls.py)", line 91, in mirror_pairs
#     mgear.rigbits.replaceShape(source_copy, [target])
#   (my path to rigbits\__init__.py"), line 427, in replaceShape
#     pm.connectAttr(c[0], sh.attr(c[1]))
#   File (my path to Python\lib\site-packages\pymel\core\general.py"), line 314, in connectAttr
#     cmds.connectAttr(source, destination, **kwargs)
#   File "(my path to \Python\lib\site-packages\pymel\internal\pmcmds.py"), line 217, in connectAttr_wrapped
#     res = new_cmd(*new_args, **new_kwargs)
# RuntimeError: The attribute 'MayaNodeEditorSavedTabsInfo.tabGraphInfo[0].nodeInfo[697].dependNode' cannot be connected to 'Shoulder_R0_ik_ctl2Shape.message'. <--- this is the duplicated controller shape that is not being renamed.
# 

before the hierarchy is something like:
left_shoulder controller_npo|left_shoulder_controller|left shoulder_controller_shape1

after (with the error) the hierarchy becomes:

(in the rig)
left_shoulder controller_npo|left_shoulder_controller|right_shoulder_controller_shape2
left_shoulder controller_npo|right_shoulder_controller|right_shoulder_controller_shape1

(outside the rig hierarchy)
null1 (which i assume is a left over from the function failing)

This happens only when there is a single guide in the scene.

Thanks

-Thomas

Also, the reason I rolled back was because this error was even worse in 5.0

Hi @tpd Thanks for the feedback,
Just to confirm is this on mGear 5.0 or 5.1?
I am using it and is true there is something pesky with the mirror controls tool I don’t get that many issues.

yeah! As Miquel, using and abusing mGear tools and mirroring all the time and unlikely ever breaking the rig as you described. Feels like something in your scene is causing some issues with it.

As I said I work in 4.22 because when I switched to 5.0 I had issues with control switching and backwards compat with my library of old rigs (even with updating them). I would update, but I’m at the end of a project and don’t have time to debug/adjust my existing post runs if anything is wrong with them.

I’ve had this issue for a long time, so I am curious why it is happening since I don’t do anything weird.

Unless this is incorrect, I will build, adjust the controls via control point adjustment/replace shape tool, and mirror. Then extract controls.

Ive done a lot of trouble shooting here, and ive found that all it takes is for the script to fail once- at least in 4.22, it does NOT delete any of the nodes it creates, causing rippling affects.

more debugging-- if there is an issue with extracting controls, it will also cause an issue with mirroring after a rebuild. deleting the control buffer fixes it

found this online. same issue

looks like it was addressed

1 Like

oh i see! I personally use Zootools for replacing shapes and colors


I do use mirror controls, though, and I’ve never had any issues using them.image|556x328

2 Likes