View Single Post
# 4 08-06-2015 , 07:40 PM
Gen's Avatar
Super Moderator
Join Date: Dec 2006
Location: South FL
Posts: 3,522
"Cube1" is just to provide a working example, I have a sneaking suspicion that he's no noob user added image

But seriously, if you want the script to act on selection lists then you should check out the "ls" command

Code:
// list whatever the user has selected
string $mySel[] = `ls -selection`;
This creates a list of objects that starts counting from zero. So the first object will be $mySel[0].

Perhaps you can approach it where you can select two objects, the first object selected will provide the data and the last will recieve it. It'll cut down some of the manual effort. It may be a bit more elegant to assign them more descriptive variable names though.

Code:
string $foot1 = $mySel[0];
string $foot2 = $mySel[1];
The copyKey and pasteKey commands should come in handy here. You could probably query the current frame with:

Code:
int $frame = `currentTime -q`;
and use that value with the copyKey command to get the appropriate information. Well that's assuming I understand the situation entirely ha!user added image


- Genny
__________________
::|| My CG Blog ||::
::|| My Maya FAQ ||::