You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
945 B
Plaintext
33 lines
945 B
Plaintext
// animated duplicates, instances script
|
|
proc animatedDuplication (int $rangeStart, int $rangeEnd, int $numOfDuplicates, int $duplicateOrInstance)
|
|
{
|
|
int $range_start = $rangeStart;
|
|
int $range_end = $rangeEnd;
|
|
int $num_of_duplicates = $numOfDuplicates;
|
|
int $step_size = ($range_end - $range_start) / $num_of_duplicates;
|
|
int $i = 0;
|
|
int $temp;
|
|
|
|
currentTime $range_start; // set to range start
|
|
|
|
string $selectedObjects[]; // to store selected objects
|
|
$selectedObjects = `ls -sl`; // store selected objects
|
|
select $selectedObjects;
|
|
|
|
while ($i <= $num_of_duplicates)
|
|
{
|
|
$temp = $range_start + ($step_size * $i);
|
|
currentTime ($temp);
|
|
// seleced the objects to duplicate or instance
|
|
select $selectedObjects;
|
|
if($duplicateOrInstance == 0)
|
|
{
|
|
duplicate;
|
|
}
|
|
else
|
|
{
|
|
instance;
|
|
}
|
|
$i++;
|
|
}
|
|
} |