Nenox
10-20-2005, 01:42 PM
Hi. I have a small problem!
I want to make an array that contains the names of objects, whose .message attribute is connected to a multiMessageAttribute. These names MUST be full path names(long), since multiple nodes in the scene have the same name.
I can do this with the following code and that works just fine:
string $charName = "biped_charNode.bindJointsMM";
string $listConnections = "ls -l `listConnections -destination false -source true $charName`";
string $ctrlJointsName[] = `eval $listConnections`;
The problem comes when want to use the code inside a global proc eg:
global proc skListConnections(string $charName){
string $listConnections = "ls -l `listConnections -destination false -source true $charName`";
string $ctrlJointsName[] = `eval $listConnections`;
}
This does not work! I get the error: $charNAme is an undefined variable..
It does however work, if I allready defined $charName in the maya script editor, prior to running the proc. (Outside the proc). But I need to call the proc from another proc, so this is not an option. :-)
Any surgestions??
:-) Sune
I want to make an array that contains the names of objects, whose .message attribute is connected to a multiMessageAttribute. These names MUST be full path names(long), since multiple nodes in the scene have the same name.
I can do this with the following code and that works just fine:
string $charName = "biped_charNode.bindJointsMM";
string $listConnections = "ls -l `listConnections -destination false -source true $charName`";
string $ctrlJointsName[] = `eval $listConnections`;
The problem comes when want to use the code inside a global proc eg:
global proc skListConnections(string $charName){
string $listConnections = "ls -l `listConnections -destination false -source true $charName`";
string $ctrlJointsName[] = `eval $listConnections`;
}
This does not work! I get the error: $charNAme is an undefined variable..
It does however work, if I allready defined $charName in the maya script editor, prior to running the proc. (Outside the proc). But I need to call the proc from another proc, so this is not an option. :-)
Any surgestions??
:-) Sune
