View Full Version : select with MEL
Biker 08-23-2005, 11:04 AM Hi.
If i have an ikHandle with the name "leftArmIk" how can i select with MEL the endEffector?
I tried with "leftArmIk.endEffector" but this select only the "leftArmIk", not the effector.
Is this syntax wrong or there is another command to do this thing? Thanks.
|
|
DataForge
08-23-2005, 08:30 PM
Select it directly by name. i.e. select effector1; (or whatever name was given to it). If you want to get the end effector name through mel you can do a query like so:
ikHandle -q -endEffector LeftArmIK;
darkjedi1929
08-24-2005, 11:20 AM
select the IK handle and run this script:
string $selIK[] = `ls -sl`;
string $selEffector[] = `listConnections -type ikHandle $selIK[0]`;
select -r $selEffector[0];
try this out; I have a similar script back home. Unfortunately, I am not near a Maya workstation to test this script out, anyway will send you that script if this does not work.
Biker
08-24-2005, 12:09 PM
First of all thx for replies.
With
ikHandle -q -endEffector LeftArmIK;
i get a result equal the name of the effector, but how can i select it? I tried to assign the script to a string variable with
string $eff = (ikHandle -q -endEffector LeftArmIK);
but i got an error...
This other script instead
string $selIK[] = `ls -sl`;
string $selEffector[] = `listConnections -type ikHandle $selIK[0]`;
select -r $selEffector[0];
simply don't works for what i need :sad:
what can i do?
darkjedi1929
08-24-2005, 01:58 PM
whoops heh heh:D my mistake...... it oughtta be
string $selIK[] = `ls -sl`;
string $selEffector[] = `listConnections -type ikEffector $selIK[0]`;
select -r $selEffector[0];
as for this:
string $eff = (ikHandle -q -endEffector LeftArmIK);
instead of the brackets you should have used the tilde key, i.e. ` this symbol. Like so:
string $eff = `ikHandle -q -endEffector LeftArmIK`; and then
select $eff;
thematt
08-24-2005, 02:35 PM
would that works..select `ikHandle -q -endEffector LeftArmIK`;
it's not test so it's just a guess.
cheers
darkjedi1929
08-24-2005, 02:53 PM
yup that would work too.........
Biker
08-25-2005, 12:35 PM
Thanks all very much. It works perfectly! Bye.
CGTalk Moderation
08-25-2005, 12:35 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.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.