View Full Version : addressing a plug through MEL

07-04-2007, 08:02 PM
can anybody tell me how can I address a plug of a blenshape node directly with MEL??
I mean plugs are named like input target ...6000 and inbetween are like 5575 etc. now how do i call it or query it trough a script???? with a variable?? it does work if a keep the number constant. but how do i use a variable there???

07-05-2007, 07:18 AM
The attribute name you feed the getAttr command is just a string. So, just do a little bit of string manipulation on it to get the correct name using a set of variables. I.E.,

int $idx = 1234;
string $bsNode = "blendShape1";

$result = `getAttr ($bsNode + ".inputTarget[" + $idx + "]")`;

Robert Bateman
07-05-2007, 10:06 AM
yeah. This is a known issue in Maya. If you delete the original target data (so that the data gets collapsed into the blendshape node), you can't ever get back target data from the API or mel (it's only known to Maya's internals). Simple answer is to not delete the targets and then the blendshape command will give you connections to the targets!

CGTalk Moderation
07-05-2007, 10:06 AM
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.