PDA

View Full Version : Checking Connections on multi message attributes


Buexe
09-05-2003, 10:27 AM
Hi everybody,
I am trying to create a procedure that connects nodes via multi message attributes. Since they already may be connected, i need a check. There seem to be a couple of ways to do so. One is of course to use the listConnections command where I specify the destination node and list all nodes connected, which I would prefer. So I create a proc which gets those nodes and comparesthem to a name I give it:

$mesh would be the destination
$attr the multi message attr
$joint the sources which may or may not be connected


global proc int jbTestCon (string $mesh, string $attr, string $joint)
{
string $list[] =`listConnections -s 1 -d 0 ($mesh + "." + $attr)`;
print $list;
for ($jay in $list)
{
int $test1 =`strcmp $jay $joint`;

if ($test1 ==0)
{
return 1;
print " is connected\n";

}
else
{
return 0;
print " is not connected\n";
}
}
}

another way would be to start with the sources , but then the strings may be mesh.skinJoint[0] and it seems more difficult to compare those, since one has to get rid of the index, or is there a smarter way?
Please help since my brain is already crumbling apart!!!

cheers
buexe

CGTalk Moderation
01-16-2006, 01:00 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.