Shake batch tools
From DreamsteepWiki
MEL SCRIPT TO RETIME A CLIP (EXPORTS A SHAKE SCRIPT)
global proc paddIffAllFolders (string $rootFolder,string $infile,string $outfolder,int $splits[])
{
string $files[] = `returnAllDirs $rootFolder`;
string $folders[];
global string $KL_LOCAL_OS_ROOT;
int $startFrame = 200;
int $endFrame = 3000;
int $duration = 180; //in frames
//this is weird, why are we creating a folder for a command that is not being called?
//it should be done inside the out file with shell script
//##check for outfolder, create if ! exists
if (`checkForDirExist $outfolder`==0)
{
print ("WARNING paddIffAllFolders no folder "+ $outfolder +" exists , creating ");
klmakeDirLocalOS $outfolder;
}
//filter only folders
for ($a=0;$a<`size $files`;$a++){ if (`gmatch $files[$a] "*.*"`==0)$folders[`size $folders`] = $files[$a];}
string $out[];
for ($a=0;$a<`size $folders`;$a++)
{
//this is weird, why are we creating a folder for a command that is not being called?
//it should be done inside the out file wioth shell script
if (`checkForDirExist ($outfolder+$folders[$a])`==0)
{
print ("WARNING paddIffAllFolders no folder "+ ($outfolder+$folders[$a]) +" exists , creating ");
klmakeDirLocalOS ($outfolder+$folders[$a]);
}
string $shell[] = `paddIffSeq ($rootFolder+$folders[$a]+"/"+$infile) ($outfolder+$folders[$a]+"/"+"retimed") $startFrame $endFrame $splits $duration`;
$out=`addArrays $out $shell`;
}
saveArrayFile ( $KL_LOCAL_OS_ROOT+"/bull.sh") $out;
}
USAGE
int $splits[] = {535,660,980,1156,1280,1360,1600,1720,2360};//wildish splits
string $outfolder = "/keith/BUFORD_COMP_3/";//source file sequence folder
string $infile = "BUFFORD_RENDER_4"; //name of each image in sequence , without extentions
paddIffAllFolders "/keith/BUFORD_COMP_2/" $infile $outfolder $splits ;

