connectAttr with set groups

48 views
Skip to first unread message

Francesco

unread,
Jan 10, 2019, 9:26:34 PM1/10/19
to Python Programming for Autodesk Maya
Hi everybody!

I had a question regarding the python connectAttr command in Maya. 

I have created FK controllers that I connected the rotation of to the rotation of a joint chain through the connectAttr command. The FK controllers are in a hierarchy where there is a group and a set group above each controller (something like tail_01_GRP --> tail_01_setGRP --> tail_01_CNTL --> tail_02_GRP --> etc...). What I'm trying to do is create a master controller and connect its rotation to the rotation of the setGRPs through the connectAttr command, so that when I rotate it it rotates all the controllers keeping the rotation to zero. 

The problem is that rotating the setGRPs doesn't rotate the joints (guessing because the actual controller doesn't have any rotation). How would I fix that? I know it could be done with orient constraints but I'm trying to avoid using too many constraints.

Thanks!

-Francesco

Michael Boon

unread,
Jan 14, 2019, 4:33:45 PM1/14/19
to Python Programming for Autodesk Maya
I think it might help if you included a screenshot of your scene and your Outliner.
Does this work if you connect the attributes using the Connection Editor? Or in other words, are you asking for help with making the rig work, or with converting your rig setup to Python?

Neil Roche

unread,
Jan 15, 2019, 9:01:57 AM1/15/19
to Python Programming for Autodesk Maya
The simplest way would be to use a plusMinusAverage node and connect the rotation of the control and the rotation of the set group to the input3D[0] and input3D[1] plugs respectivley, set the operation to sum and then connect the output3D to your joint rotation so both objects will drive the joint.

Francesco

unread,
Jan 15, 2019, 7:03:00 PM1/15/19
to Python Programming for Autodesk Maya
Didn't think of using the plusMinusAverage node but it works! I connected the rotation of the Master FK controller to input3D[0] and rotation of the FK controllers (not the set groups) to input3D[1] of the plusMinusAverage node. I also had to connect the rotation of the FK Master controller to the rotation of each set group to make the controllers follow correctly.

Thank you for the advice!
Message has been deleted

Francesco

unread,
Jan 15, 2019, 7:26:24 PM1/15/19
to Python Programming for Autodesk Maya
I tried to connect the rotation through the Connection Editor but it achieves the same effect as connecting through the connectAttr command. I just wanted to know if it was possible to use the connectAttr command to rotate a controller that is already connected by rotating its parent. I've included some screenshots of my scene and what I was trying to achieve but Neil has already given me a solution.

Thank you anyway!

FK_01.jpg

FK_02.jpg

FK_03.jpg

Reply all
Reply to author
Forward
0 new messages