PDA

View Full Version : doubling constraint problem in mel


cbernadet
10-31-2011, 05:53 PM
Hi,

I have this problem in Maya 2012 (same in 2011).
I create some bones and controlers and I apply manually some constraint on it.
I then copy the script in a mel shelf.
I start a new scene and execute the mel script: Some of my constaint are duplicated (attributes in the channel box are green instead of blue because the constraint have been created twice.)
The problem seems to appear randomly because when I restart or try with Maya 2011 for example, some constraint are fine, but others are created twice...

Someone knows how to fix this problem?

WesHowe
10-31-2011, 09:30 PM
Not enough details. Can you post the MEL code?

<* Wes *>

berniebernie
11-02-2011, 04:37 PM
when you create nodes and copy paste whatever pops up in the script editor you:

a/ sometimes accidently copy garbage code (like UI updates that are triggered by previous commands, but usually these are non critical errors)
b/ copy hard-coded object paths (aimConstraint1, multiplyDivide2,groupA|joint1 etc...), so what happens is that in the scene you copied from have different paths than the 'new' one.

So make sure, if you copy from script editor to script editor, that object, nodes are named the same way.

Just apply the copied script line by line to see where it ****s up.

CGTalk Moderation
11-02-2011, 04:37 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.