From VFXPedia
------------------------------------------------------------
-- Missing Frames
--
-- Revision: 3.0 by Peter Marinov (peter@wwfx.net)
--
-- Comp script
--
-- Checks all loaders for missing frames.
--
-- requires eyeon.scriptlib
--
-- written : Nov 11th, 2002
-- updated for Fu5: Jun 09, 2006
--
------------------------------------------------------------
msg = {}
line = "\n"..string.rep('_',50).."\n"
print("Checking for missing frames:"..line)
comp = fusion.GetCurrentComp() or fusion:GetCurrentComp()
frame = comp:GetFrameList()[1]
frame:SwitchMainView('ConsoleView') -- take users attention.
ldr = eyeon.GetLoaders(comp)
if not ldr then
table.insert(msg,'No loaders in the flow')
else
for i, tool in ldr do
local missing = {}
local frames = eyeon.LD_GetFrames(tool)
local ta = tool:GetAttrs()
local clipname = ta.TOOLST_Clip_Name
local name = ta.TOOLS_Name
local err = ''
if clipname == nil then table.insert(msg,name.." : Empty loader") end
if ta.TOOLB_PassThrough == true then table.insert(msg,name.." : PASSTROUGH") end
if frames==puldownup then
table.insert(msg,"[ "..name.."] is set to pulldown or pullup.This script does not support these import modes.")
end
if frames == nil then
table.insert(msg,"Error - can't read the sequence!! check the loader: ["..name.."]")
else
for i, file in frames do
k=readdir(file)
if not k[1] then
table.insert(missing, k.Pattern)
end
end
if table.getn(missing) > 0 then
print("\n"..name.." - Missing Frames:"..line)
for i, v in missing do
table.insert(msg,'['..name..']'..v)
print(" "..v.."\n")
end
print(line)
else
print(string.format('%s%s%s','\n','[ '..name..' ]','\t\t - '..table.getn(frames)..'fr. OK.'))
end
end
end
end
er=table.getn(msg)
print('Check finished'..line..'Found '..er..' error(s).')
str=table.concat(msg,"\n")
if er>0 then
comp:AskUser('Result from "Missing frames" check :',{{"","Text",ReadOnly = true,Lines =35,Wrap =false, Default=str}})
end