Hi everyone.
Hi need a little help on a script that I made. In resume I need something that read the amount of poses of certain character and then create a window with buttons, each on relative to a pose.
This check the amount of poses.
global proc string[] currentCharacterPoses()
{
string $allPoses[];
string $characters[] = `currentCharacters`;
int $n=0;
int $nchars = size($characters);
if ($nchars == 0) return allCharacterPoses();
for ($i=0; $i < $nchars; $i++)
{
string $poses[] = `pose -q -n $characters[$i]`;
for ($j=0; $j < size($poses); $j++)
$allPoses[$n++] = $poses[$j];
}
return $allPoses;
}
And based on that information.
string $posesDo[] = `currentCharacterPoses`;
int $i;
for ($i=1; $i< size($posesDo);$i++)
{
symbolButton -i ($filePath + "Corpo\_P" + $i + ".BMP") -w 75 -h 75 -ann "$i" -c "doPose";
}
But now I have a problem. Every button that I create will have as command "doPose" and I don't want that. Or I need a way to identify every button so later I can use that information to search and applied the correspondent pose.
Can anyone help me with this, please?
created
Sep '10
last reply
Sep '10
- 4
replies
- 2.7k
views
- 1
user