I was hoping I might be able to pick your brains. I've been doing some simple rigging and wrote some simple scripts to do the FK IK switching. For this I made 4 shelf buttons to do all the switching. Granted I may not be on the right and best track when it comes to technique ... no doubt I will discover new and more exciting ways to go about this, but that's for another day.
It occurred to me I could replace my 4 buttons with a single button, based on what i may have selected. not wanting to use explicit names I was going to add a hidden attribute to the object in question and then select it by it's attribute name
Code:
select -r `ls -o "*.controlObject"`;
the trouble comes when I want to test what it is I have selected use it in a variable and then carry out a command
Code:
string $myControl = `ls -o "*.controlObject"`; string $mySelect[] = `ls -sl`; if ($mySelect[0] == $myControl) { print "By jove you cracked it"; //replace with proc name later } else { print "nothing here \nBoo!"; //replace with proc name later }
// Error: Cannot convert data of type string[] to type string. //
If I were to change this line
Code:
string $myControl = `ls -o "*.controlObject"`;
Code:
string $myControl = "leftShoulderControl";
I really would appreciate any help you can offer. Apologies if this makes no sense!
Tony.