PDA

View Full Version : utility checkin for missing frames


longrayjohnson
08-10-2010, 11:17 AM
hi,

any utility that tells me WHAT frames are missing ?

Eshta
08-13-2010, 09:25 PM
if you use Fcheck , it should say or at least stop at the missing frame .
No ?

bigbossfr
08-13-2010, 10:00 PM
///////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////
///
/// Procedure Name : preRenderCheck.mel V0.1
///
/// Updated : Juin, 2007
///
/// Author : Damien Bataille
/// Contact : deex@deex.info
///
///
/// Description :
///
/// Permet de créer un fichier .bat qui calcule que les images manquantes d'une série d'image.
///
/// How to use :
///
/// Tapez "preRenderCheck imagestart imageend" dans le cadre en bas MEL.
///
///
/// Exemple : preRenderCheck 1 100 <----- ici le mel créera un fichier .bat qui calculera
/// que les images manquantes entre 1 et 100.
///
///
/// All Rights Reserved .
///////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////

global proc preRenderCheck(int $startFrame, int $endFrame)
{
// generate bat file
string $rootDir = `workspace -q -rd`;
string $renderDir = `workspace -q -rte "images"`;
if (!`gmatch $renderDir "*:*"`)
$renderDir = $rootDir + $renderDir + "/";
string $sceneName = `file -q -sn`;
string $batFile;
string $bat = "render -r mr -v 3";
$bat += " -proj \"" + $rootDir + "\"";
$bat += " -rd \"" + $renderDir + "\"";
$bat += " -pad 3 -b 1";

// check for missing images
int $start = -1;
int $end = -1;
//int $startFrame = `getAttr defaultRenderGlobals.startFrame`;
//int $endFrame = `getAttr defaultRenderGlobals.endFrame`;
string $imageName = `getAttr defaultRenderGlobals.imageFilePrefix`;
int $imageFormat = `getAttr defaultRenderGlobals.imageFormat`;
string $ext;
string $imageFormats[] = {"gif", "pic", "rla", "tif", "tif", "sgi", "", "iff", "jpg", "eps", "iff", "cin", "yuv", "sgi",
"", "", "", "", "", "tga", "bmp","psd",
"png", "", "", "dds", "psd"};
for ($i = 0; $i < 37; $i++)
{
if ($i > 20)
$i = 31;
if ($imageFormat == $i)
{
$ext = $imageFormats[$i];
break;
}
}

string $pix = $imageName + ".*." + $ext;
string $images[] = `getFileList -folder $renderDir -filespec $pix`;
string $frame;
int $found;
for ($i = $startFrame; $i <= $endFrame; $i++)
{
if ($start < 0)
$found = 0;
if ($i < 9)
$frame = "00" + $i;
else if ($i > 9 && $i < 100)
$frame = "0" + $i;
$pix = $imageName + "." + $frame + "." + $ext;
for ($image in $images)
{
if ($start < 0)
{
if ($pix == $image)
{
$found = 1;
break;
}
}
else
{
if ($pix == $image)
{
$end = $i - 1;
$batFile += $bat;
$batFile += " -s " + $start + " -e " + $end;
$batFile += " " + $sceneName + "\n";
$start = -1;
$end = -1;
break;
}
}
}
if ($found == 0)
{
$start = $i;
$found = 1;
}
}
if ($start && $end == -1)
{
$end = $endFrame;
$batFile += $bat;
$batFile += " -s " + $start + " -e " + $end;
$batFile += " " + $sceneName + "\n";
}

// write and launch new bat
$extBat = ".bat";
string $buffer[];
tokenize $sceneName "/" $buffer;
$sceneName = $buffer[`size $buffer` - 1];
$file = $rootDir + $sceneName + $startFrame + "_" + $endFrame + $extBat;
$fileId = `fopen $file "w"`;
fwrite $fileId $batFile;
fclose $fileId;
print $endFrame;
print $batFile;
//system ("start " + $file);
}

To start the script : preRenderCheck startFrame endFrame
Like :
preRenderCheck 1 10

It is an old script. I don't know if it is working now.

galeru
08-14-2010, 01:22 AM
alien check sequence has always been a saviour for me

http://www.creativecrash.com/maya/marketplace/scripts-plugins/utility-external/c/alien-check-sequence

CGTalk Moderation
08-14-2010, 01:22 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.