Net rendering a post render script help.
I am trying to write a script that runs on completion of a network rendered job. When the job is finished it will run and compile all the rendered frames into an .mov and save it in a watch folder for adobe media encoder. Then adobe media encoder will then encode the .mov into a .flv ready to be put into flash.
Most of this script was graciously written by Richard Annema in a previous thread on cgsociety http://forums.cgsociety.org/showthr...p?f=98&t=704301. I am just having some problems getting it to run with backburner. Here is the script I have modified to run at the completion of a job. It still dosent work right though any help would be greatly appreciated.
--connect to manager
manager = NetRender.GetManager()
--get the name of the job
myJob = manager.getJobs #name
--check to see if the job is done
myJobComplete = myJob.notifyCompletion
--if the job is done then run the script
if myJobComplete == true then
-- begining of script written by Richard Annema
-- get the files rendered
files = getFiles ((getFilenamePath rendOutputFilename) + (getFilenameFile rendOutputFilename) + "*" + (getFilenameType rendOutputFilename))
-- remove any still we might have rendered
if (files.count > 1) then (
stillIndex = findItem files rendOutputFilename
if (stillIndex != 0) then ( deleteItem files stillIndex )
-- make sure the frames are in the correct order
-- create an IFL
iflName = getFilenamePath rendOutputFilename + getFilenameFile rendOutputFilename + ".ifl"
iflFile = createFile iflName
for f in files do ( format "%\n" f to:iflFile )
-- open the IFL as a bitmap
iflBitmap = openBitmap iflName
-- create an output bitmap
movBitmap = bitmap iflBitmap.width iflBitmap.height
-- create a mov filename
movName = "\\\Tta_server\3d model library\AdobeWatch\\" + getFilenameFile rendOutputFilename + ".mov"
-- delete pre-existing quicktime mov
-- set its name to the mov filename
movBitmap.filename = movName
-- loop through its frames
for i = 0 to (iflBitmap.numFrames - 1) do (
iflBitmap.frame = i
-- get the ifl's frame into the mov bitmap
copy iflBitmap movBitmap
-- display as we go over each frame - just so you can see something's happening
-- save out the mov bitmap (appends as new frame)
save movBitmap frame:i
-- close the mov so it is finalized