Home Technical Talk

Mel issue: joints don't orient right.

I'm writing a code to make the CGToolkit's art of rigging arm in MEL. It was going just fine. I got my IK/FK switch set up, had the elbows constrained, and the wrist working quite easily. Then I moved on to the right arm, and here's what I got: 2d0bb6o.jpg

($armSideLong = "right" and $armSide = "r_")

The right arm is broken at the forearm, as you can see. (The left arm is set up like it's supposed to be.)

I've found the bit of code where things start to go wrong (It's literally at the very end of the procedure):
select -r ($armSideLong + "ArmControl");
select -tgl ($armSide + "wrist");
orientConstraint -mo -skip x -weight 1;

select -r ($armSideLong + "ArmControl");
select -tgl ($armSide + "forearm");
orientConstraint -mo -skip y -skip z -weight 1;

select -r ($armSideLong + "ArmControl");
select -tgl ($armSide + "ArmIK");
parentConstraint -w 1 ;
poleVectorConstraint -w 1;
I'm pretty sure it's the second block with the orient constraint on the forearm. It works fine without the -skip tags, but I don't want it to orient Y and Z, just X.

Any ideas on why it's doing this? If you need to see more of the code, let me know.

P.S. Is there a way to disable nodes temporarily in MEL?

Replies

  • Noors
    Options
    Offline / Send Message
    Noors greentooth
    Haven't touched maya for 5 years but isn't it because your joints/controler local axis point the same way as your left arm instead of beeing symmetrical ?
  • Daemonecles
    Options
    Offline / Send Message
    Daemonecles polycounter lvl 6
    It would be much more helpful to also see your outliner with all the joints that are in this equation highlighted, also seeing the hierarchy connections.
  • SlightlyChaotic
    @Noors: Dang, that could be the case, in which case I'll feel really, really stupid.

    If that's not the case, (it'll take me a little bit before I can check) I'll add screens of my outliner and hypergraph. Thanks.

    Edit: Dammit. I guess I took for granted that mirroring the controller also kept it oriented. Which it doesn't. Now I feel like a n00b.

    Thanks though. Would have taken me a while to figure it out in my stupidity.
Sign In or Register to comment.