View Full Version : Orient a group node to match a joint?

09 September 2005, 12:41 AM
Hi there. Pretty simple question. I created a nurbs circle that I want to orient to a shoulder joint that's rotated at an angle. To keep the nurbs circle at "zero" rotations, I created a "group" node above it. What I would normally do at this point is "eyeball" it so the group node is approximately close to the joints rotation orientation(for the purpose of using an orient constrant to control it).

This is kinda a lot of work I'm doing to get it to line up. I know the quicker way would just be to duplicate the joint, group it and use the "joint" selection handles to control to shoulder, but I like to use custom controllers for it.

Is there a mel script or tool that I can use to "Snap" the groups orientation to match the joints orientation exactly?


09 September 2005, 01:27 PM
There are many. But you don't really need one. Make sure your murbs circle is pointind down the axis you're using (X Y or Z). Parent the group to the joint. Reset transformations on the group. Unparent the group. Bingo.

Hope this helps!

09 September 2005, 12:27 AM
here what u need

global proc OrientonJoint ()
string $sel[] = `ls -sl`;
string $group = `group -n ($sel[1] + "_Orient") $sel[1]`;
$PointConst = `pointConstraint $sel[0] $group `;
$OrientConst = `orientConstraint $sel[0] $group`;
delete $PointConst $OrientConst;

09 September 2005, 01:00 AM
Thanks, all. Josh Carey over at gave me a bunch of solutions too and a script that parents icons to the shape node. Many solutions :)

//parentShape script
//no error checking
//the shape parent code for this came from the website.
// just pick the geometry and then the joint and run the script.

string $objs[1];
$objs = `ls -sl`;

makeIdentity -apply true -t 1 -r 1 -s 1 -n 0;

select -add $objs[1];

string $objs[0];
string $shape[0];
$objs = `ls -sl`;
$shape = `listRelatives -f -s $objs[0]`;

select $shape[0] $objs[1];
parent -s -r;

// ------------------------------

09 September 2005, 10:07 PM
that script doesnt do what you ask u still have to put ur circle in the same angle of your joint that script is only a way to cheat a constraint to drive ur joint.
and plus if u want to hide ur joint ur controller are gone with it.

09 September 2005, 12:19 AM
Yeah, I know. It only works with certain types of controlers(can't zero out translates) and it's just a shortcut cause I use it on a duplicate of the joint(driver joint) and instead of using selection handles, I use an icon. But yeah, orienting the group node is better.

Here's the other solution emailed to me that seems to work best for my needs:

"another way is to point constrain and orient constrain the control to
the joint, then delete those constraints and move the control into
position by moving the cv's."

09 September 2005, 12:41 AM
Just use the script i write on my first post
just select ur bone and ur controller and that will do the job for ur og grouping and orient and point constraint to get the rotation of ur joint

09 September 2005, 02:52 AM
Cool, thanks. Yeah, I just realized that. ;)

09 September 2005, 06:25 AM
Give this little guy a try.
controlMaker.mel (

I wrote this for a co-worker and he was nice enough to post it on his site.

Basically its a swiss army knife of control making. Really fast and easy to use.

1. Select a joint.
2. Select control type from option menu.
3. What kind of snap you want.

There is a rotate control window that will let you change the direction of the control without having to fuss with switching to component mode. The controls will auto scale to what size the joint is. This option can be turned off. Give prefixes and auto group each new control under one group.

The script has been my little rigging buddy. Hope you feel the same. Have fun with it


BTW, Jeff did you work with Derek at Bardel? Good buddy of mine.

09 September 2005, 11:08 AM
Nice, Nolan. Very nice. If I'd had this little fellow a week earlier, I'd have finished my current rigg in half the time. :applause:

Thanks for sharing this little gem with us. :)


09 September 2005, 04:41 PM
No prob. One other quick note about the script. It's really useful for facial rigging. Say you have a cluster or joint you want to control with set driven keys but still have a way to tweak it. The create extra group will help. Use the selection handle option. This will create a handle for that group. Create your controls and use the handles to drive the defromer. Then turn off the handles and now you can select the control and tweak on top of the SDK. Make sense?

09 September 2005, 06:17 PM
Cool. Yeah, it makes sense. The extra group frees up the joint/cluster so you can still key that along with SDK. Very useful.

Although Maya 7 has a new "pair blend" node that will Blend something driven by SDK and a contraint and you can set the weight to be biased towards the constraint or the SDK. The thing I love about alias is that they really listen to what their users want.

Thanks :)

09 September 2005, 07:40 PM
I'm not sure if we are talking about the same thing. But 6.5 has pair blend

CGTalk Moderation
09 September 2005, 07:40 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.