Notifications
Clear all

[Closed] Post-Render script…

note that if you run it as a postRender script, error messages from maxscript are pretty… uninformative. Open it as a regular script and then evaulate it (after you render a sequence of images)… that should give better information if there’s some error in the code itself. The path really shouldn’t matter… quicktime under 64bit might be an issue, but I presume you can save quicktime files manually so that shouldn’t apply.

Here is what I am getting now. Looks pretty good until we get to “create an ouput bitmap”.

“autoQuicktime DEBUG”
“autoQuicktime DEBUG”
“get the files rendered”
“get the files rendered”
#(“C:\Transfer est\TestMe0000.jpg”, “C:\Transfer est\TestMe0001.jpg”, “C:\Transfer est\TestMe0002.jpg”, “C:\Transfer est\TestMe0003.jpg”, “C:\Transfer est\TestMe0004.jpg”, “C:\Transfer est\TestMe0005.jpg”, “C:\Transfer est\TestMe0006.jpg”, “C:\Transfer est\TestMe0007.jpg”, “C:\Transfer est\TestMe0008.jpg”, “C:\Transfer est\TestMe0009.jpg”, “C:\Transfer est\TestMe0010.jpg”, “C:\Transfer est\TestMe0011.jpg”, “C:\Transfer est\TestMe0012.jpg”, “C:\Transfer est\TestMe0013.jpg”, “C:\Transfer est\TestMe0014.jpg”, “C:\Transfer est\TestMe0015.jpg”, “C:\Transfer est\TestMe0016.jpg”, “C:\Transfer est\TestMe0017.jpg”, “C:\Transfer est\TestMe0018.jpg”, “C:\Transfer est\TestMe0019.jpg”, …)
“C:\Transfer est\TestMe0000.jpg”
“C:\Transfer est\TestMe0001.jpg”
“C:\Transfer est\TestMe0002.jpg”
“C:\Transfer est\TestMe0003.jpg”
“C:\Transfer est\TestMe0004.jpg”
“C:\Transfer est\TestMe0005.jpg”
“C:\Transfer est\TestMe0006.jpg”
“C:\Transfer est\TestMe0007.jpg”
“C:\Transfer est\TestMe0008.jpg”
“C:\Transfer est\TestMe0009.jpg”
“C:\Transfer est\TestMe0010.jpg”
“C:\Transfer est\TestMe0011.jpg”
“C:\Transfer est\TestMe0012.jpg”
“C:\Transfer est\TestMe0013.jpg”
“C:\Transfer est\TestMe0014.jpg”
“C:\Transfer est\TestMe0015.jpg”
“C:\Transfer est\TestMe0016.jpg”
“C:\Transfer est\TestMe0017.jpg”
“C:\Transfer est\TestMe0018.jpg”
“C:\Transfer est\TestMe0019.jpg”
“C:\Transfer est\TestMe0020.jpg”
“C:\Transfer est\TestMe0021.jpg”
“C:\Transfer est\TestMe0022.jpg”
“C:\Transfer est\TestMe0023.jpg”
“C:\Transfer est\TestMe0024.jpg”
“C:\Transfer est\TestMe0025.jpg”
“C:\Transfer est\TestMe0026.jpg”
“C:\Transfer est\TestMe0027.jpg”
“C:\Transfer est\TestMe0028.jpg”
“C:\Transfer est\TestMe0029.jpg”
“C:\Transfer est\TestMe0030.jpg”
“C:\Transfer est\TestMe0031.jpg”
“C:\Transfer est\TestMe0032.jpg”
“C:\Transfer est\TestMe0033.jpg”
“C:\Transfer est\TestMe0034.jpg”
“C:\Transfer est\TestMe0035.jpg”
“C:\Transfer est\TestMe0036.jpg”
“C:\Transfer est\TestMe0037.jpg”
“C:\Transfer est\TestMe0038.jpg”
“C:\Transfer est\TestMe0039.jpg”
“C:\Transfer est\TestMe0040.jpg”
“C:\Transfer est\TestMe0041.jpg”
“C:\Transfer est\TestMe0042.jpg”
“C:\Transfer est\TestMe0043.jpg”
“C:\Transfer est\TestMe0044.jpg”
“C:\Transfer est\TestMe0045.jpg”
“C:\Transfer est\TestMe0046.jpg”
“C:\Transfer est\TestMe0047.jpg”
“C:\Transfer est\TestMe0048.jpg”
“C:\Transfer est\TestMe0049.jpg”
“C:\Transfer est\TestMe0050.jpg”
“C:\Transfer est\TestMe0051.jpg”
“C:\Transfer est\TestMe0052.jpg”
“C:\Transfer est\TestMe0053.jpg”
“C:\Transfer est\TestMe0054.jpg”
“C:\Transfer est\TestMe0055.jpg”
“C:\Transfer est\TestMe0056.jpg”
“C:\Transfer est\TestMe0057.jpg”
“C:\Transfer est\TestMe0058.jpg”
“C:\Transfer est\TestMe0059.jpg”
“C:\Transfer est\TestMe0060.jpg”
“C:\Transfer est\TestMe0061.jpg”
“C:\Transfer est\TestMe0062.jpg”
“C:\Transfer est\TestMe0063.jpg”
“C:\Transfer est\TestMe0064.jpg”
“C:\Transfer est\TestMe0065.jpg”
“C:\Transfer est\TestMe0066.jpg”
“C:\Transfer est\TestMe0067.jpg”
“C:\Transfer est\TestMe0068.jpg”
“C:\Transfer est\TestMe0069.jpg”
“C:\Transfer est\TestMe0070.jpg”
“C:\Transfer est\TestMe0071.jpg”
“C:\Transfer est\TestMe0072.jpg”
“C:\Transfer est\TestMe0073.jpg”
“C:\Transfer est\TestMe0074.jpg”
“C:\Transfer est\TestMe0075.jpg”
“C:\Transfer est\TestMe0076.jpg”
“C:\Transfer est\TestMe0077.jpg”
“C:\Transfer est\TestMe0078.jpg”
“C:\Transfer est\TestMe0079.jpg”
“C:\Transfer est\TestMe0080.jpg”
“C:\Transfer est\TestMe0081.jpg”
“C:\Transfer est\TestMe0082.jpg”
“C:\Transfer est\TestMe0083.jpg”
“C:\Transfer est\TestMe0084.jpg”
“C:\Transfer est\TestMe0085.jpg”
“C:\Transfer est\TestMe0086.jpg”
“C:\Transfer est\TestMe0087.jpg”
“C:\Transfer est\TestMe0088.jpg”
“C:\Transfer est\TestMe0089.jpg”
“C:\Transfer est\TestMe0090.jpg”
“C:\Transfer est\TestMe0091.jpg”
“C:\Transfer est\TestMe0092.jpg”
“C:\Transfer est\TestMe0093.jpg”
“C:\Transfer est\TestMe0094.jpg”
“C:\Transfer est\TestMe0095.jpg”
“C:\Transfer est\TestMe0096.jpg”
“C:\Transfer est\TestMe0097.jpg”
“C:\Transfer est\TestMe0098.jpg”
“C:\Transfer est\TestMe0099.jpg”
“C:\Transfer est\TestMe0100.jpg”
OK
“remove any still we might have rendered”
0
“make sure the frames are in the correct order”
“Sorted files:”
“C:\Transfer est\TestMe0000.jpg”
“C:\Transfer est\TestMe0001.jpg”
“C:\Transfer est\TestMe0002.jpg”
“C:\Transfer est\TestMe0003.jpg”
“C:\Transfer est\TestMe0004.jpg”
“C:\Transfer est\TestMe0005.jpg”
“C:\Transfer est\TestMe0006.jpg”
“C:\Transfer est\TestMe0007.jpg”
“C:\Transfer est\TestMe0008.jpg”
“C:\Transfer est\TestMe0009.jpg”
“C:\Transfer est\TestMe0010.jpg”
“C:\Transfer est\TestMe0011.jpg”
“C:\Transfer est\TestMe0012.jpg”
“C:\Transfer est\TestMe0013.jpg”
“C:\Transfer est\TestMe0014.jpg”
“C:\Transfer est\TestMe0015.jpg”
“C:\Transfer est\TestMe0016.jpg”
“C:\Transfer est\TestMe0017.jpg”
“C:\Transfer est\TestMe0018.jpg”
“C:\Transfer est\TestMe0019.jpg”
“C:\Transfer est\TestMe0020.jpg”
“C:\Transfer est\TestMe0021.jpg”
“C:\Transfer est\TestMe0022.jpg”
“C:\Transfer est\TestMe0023.jpg”
“C:\Transfer est\TestMe0024.jpg”
“C:\Transfer est\TestMe0025.jpg”
“C:\Transfer est\TestMe0026.jpg”
“C:\Transfer est\TestMe0027.jpg”
“C:\Transfer est\TestMe0028.jpg”
“C:\Transfer est\TestMe0029.jpg”
“C:\Transfer est\TestMe0030.jpg”
“C:\Transfer est\TestMe0031.jpg”
“C:\Transfer est\TestMe0032.jpg”
“C:\Transfer est\TestMe0033.jpg”
“C:\Transfer est\TestMe0034.jpg”
“C:\Transfer est\TestMe0035.jpg”
“C:\Transfer est\TestMe0036.jpg”
“C:\Transfer est\TestMe0037.jpg”
“C:\Transfer est\TestMe0038.jpg”
“C:\Transfer est\TestMe0039.jpg”
“C:\Transfer est\TestMe0040.jpg”
“C:\Transfer est\TestMe0041.jpg”
“C:\Transfer est\TestMe0042.jpg”
“C:\Transfer est\TestMe0043.jpg”
“C:\Transfer est\TestMe0044.jpg”
“C:\Transfer est\TestMe0045.jpg”
“C:\Transfer est\TestMe0046.jpg”
“C:\Transfer est\TestMe0047.jpg”
“C:\Transfer est\TestMe0048.jpg”
“C:\Transfer est\TestMe0049.jpg”
“C:\Transfer est\TestMe0050.jpg”
“C:\Transfer est\TestMe0051.jpg”
“C:\Transfer est\TestMe0052.jpg”
“C:\Transfer est\TestMe0053.jpg”
“C:\Transfer est\TestMe0054.jpg”
“C:\Transfer est\TestMe0055.jpg”
“C:\Transfer est\TestMe0056.jpg”
“C:\Transfer est\TestMe0057.jpg”
“C:\Transfer est\TestMe0058.jpg”
“C:\Transfer est\TestMe0059.jpg”
“C:\Transfer est\TestMe0060.jpg”
“C:\Transfer est\TestMe0061.jpg”
“C:\Transfer est\TestMe0062.jpg”
“C:\Transfer est\TestMe0063.jpg”
“C:\Transfer est\TestMe0064.jpg”
“C:\Transfer est\TestMe0065.jpg”
“C:\Transfer est\TestMe0066.jpg”
“C:\Transfer est\TestMe0067.jpg”
“C:\Transfer est\TestMe0068.jpg”
“C:\Transfer est\TestMe0069.jpg”
“C:\Transfer est\TestMe0070.jpg”
“C:\Transfer est\TestMe0071.jpg”
“C:\Transfer est\TestMe0072.jpg”
“C:\Transfer est\TestMe0073.jpg”
“C:\Transfer est\TestMe0074.jpg”
“C:\Transfer est\TestMe0075.jpg”
“C:\Transfer est\TestMe0076.jpg”
“C:\Transfer est\TestMe0077.jpg”
“C:\Transfer est\TestMe0078.jpg”
“C:\Transfer est\TestMe0079.jpg”
“C:\Transfer est\TestMe0080.jpg”
“C:\Transfer est\TestMe0081.jpg”
“C:\Transfer est\TestMe0082.jpg”
“C:\Transfer est\TestMe0083.jpg”
“C:\Transfer est\TestMe0084.jpg”
“C:\Transfer est\TestMe0085.jpg”
“C:\Transfer est\TestMe0086.jpg”
“C:\Transfer est\TestMe0087.jpg”
“C:\Transfer est\TestMe0088.jpg”
“C:\Transfer est\TestMe0089.jpg”
“C:\Transfer est\TestMe0090.jpg”
“C:\Transfer est\TestMe0091.jpg”
“C:\Transfer est\TestMe0092.jpg”
“C:\Transfer est\TestMe0093.jpg”
“C:\Transfer est\TestMe0094.jpg”
“C:\Transfer est\TestMe0095.jpg”
“C:\Transfer est\TestMe0096.jpg”
“C:\Transfer est\TestMe0097.jpg”
“C:\Transfer est\TestMe0098.jpg”
“C:\Transfer est\TestMe0099.jpg”
“C:\Transfer est\TestMe0100.jpg”
OK
“Files section done”
“Files section done”
“”
“”
“create an IFL”
“create an IFL”
“C:\Transfer est\TestMe.ifl”
“C:\Transfer est\TestMe.ifl”
“C:\Transfer est\TestMe.ifl”
<File:C:\Transfer est\TestMe.ifl>
<File:C:\Transfer est\TestMe.ifl>
<File:C:\Transfer est\TestMe.ifl>
“writing filenames to ifl file”
“writing filenames to ifl file”
OK
“closing ifl file”
“closing ifl file”
OK
“IFL section done”
“IFL section done”
“”
“”
“open the IFL as a bitmap”
“open the IFL as a bitmap”
BitMap:C:\Transfer est\TestMe.ifl
BitMap:C:\Transfer est\TestMe.ifl
BitMap:C:\Transfer est\TestMe.ifl
“IFL opening section done”
“IFL opening section done”
“create an output bitmap”
“create an output bitmap”
** system exception **
undefined
undefined
“create a mov filename”
“create a mov filename”
“C:\Transfer est\TestMe.mov”
“C:\Transfer est\TestMe.mov”
“C:\Transfer est\TestMe.mov”
“delete pre-existing quicktime mov”
“delete pre-existing quicktime mov”
– Error occurred in anonymous codeblock; filename: C:\Documents and Settings\Mike\Desktop\autoquicktime_debug.ms; position: 1393
– Unknown property: “filename” in undefined
“set its name to the mov filename”
“set its name to the mov filename”
– Error occurred in anonymous codeblock; filename: C:\Documents and Settings\Mike\Desktop\autoquicktime_debug.ms; position: 1465
– Unknown property: “filename” in undefined
– Error occurred in anonymous codeblock; filename: C:\Documents and Settings\Mike\Desktop\autoquicktime_debug.ms; position: 1491
– Unknown property: “filename” in undefined
“output bitmap section done”
“output bitmap section done”
“loop through its frames and create the quicktime file”
“loop through its frames and create the quicktime file”
101
101
– Error occurred in i loop; filename: C:\Documents and Settings\Mike\Desktop\autoquicktime_debug.ms; position: 1768
– Frame:
– i: 0
– Type error: copy requires BitMap, got: undefined
“loop done”
“loop done”
“close the mov so it is finalized”
“close the mov so it is finalized”
– Error occurred in anonymous codeblock; filename: C:\Documents and Settings\Mike\Desktop\autoquicktime_debug.ms; position: 2039
– No ““close”” function for undefined
“quicktime section done”
“quicktime section done”
“open the IFL and the MOV in the RAM Player side-by-side (for quality comparison? who knows)”
“open the IFL and the MOV in the RAM Player side-by-side (for quality comparison? who knows)”

I just got some eroors trying to just save a .mov from ram player. So that might be the problem right there. I am going to try to update quicktime and see if that helps.

huh… I wonder if that’s the jpg bitmap copy bug*…

… it’s still there in 3ds Max 2009… what on Earth 😮

Anyway – try the attached version – v0.03 / v0.03d

  • for the curious… have a gander at this marvel:

a = openBitmap (getFiles "c:\	emp\\*.jpg")[1]
BitMap:c:	emp\DSC09834.jpg
b = copy a
** system exception **

c = openBitmap (getFiles "c:\	emp\\*.png")[1]
BitMap:c:	emp\kernels.png
d = copy c
BitMap:

Perfect. Works great. A few hicups with the .jpg files but I did finely get a .mov. I changed formats to .png and nothing but smooth sailing. Since we realy onling use .pngs we should be good. Thanks so much ZeBoxx2

Ok this is working great. I am just trying to edit a section so that I can save the mov to a different directory or the adobe watch folder. The green section is what I have been trying to edit with no luck. I cant seem to track down what script to use to set the new path to [\Tta_server\3d](file://tta_server/3d) model library\AdobeWatch\fliename.mov. I Basically just replaced the green txt below with the previous string with no luck. So would I do that or should I just write copyFile to move the mov to the new location. Neither have worked for me. Any help would be greatly appreciated.

– create an output bitmap
movBitmap = bitmap iflBitmap.width iflBitmap.height
– create a mov filename

Original script movName = getFilenamePath rendOutputFilename + getFilenameFile rendOutputFilename + “.mov”

My script movName = [[color=lime]\Tta_server\3d](file://tta_server/3d) model library\AdobeWatch\ + getFilenameFile rendOutputFilename +[/color] “.mov”

– delete pre-existing quicktime mov
deleteFile movBitmap.filename
– set its name to the mov filename
movBitmap.filename = movName

Ok I have had some luck using this to save the mov. But I keep getting errors now. It worked once but it hasent worked sence then.

movName = getFilenamePath ” \\Tta_server\3d model library\AdobeWatch\ ” + getFilenameFile rendOutputFilename + “.mov”

Ok no errors in the script now but I am getting a dialog that pops up and says error opening the mov and then one right after thats says error creating.

I am wondering if there is somthing I need to do becuse it is on the network.

Got it sorted out. I was writing the directory string wrong. Here is the finished working script. Works with net rendering as well.

  • 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
    sort files
    )
    – create an IFL
    iflName = getFilenamePath rendOutputFilename + getFilenameFile rendOutputFilename + “.ifl”
    iflFile = createFile iflName
    for f in files do ( format “%
    ” f to:iflFile )
    close 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
deleteFile movBitmap.filename
– 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
display movBitmap
– save out the mov bitmap (appends as new frame)
save movBitmap frame:i
)

– close the mov so it is finalized
close movBitmap

cool – glad you got it working

Note that you can remove the ‘display’ line, or wrap it in ‘if (isnetserver()) then ( … )’, as otherwise I think the rendernodes will pop up the VFB showing the images… something you’d typically not want on a node (doesn’t do any harm, other than freak out sysadmins)

Page 2 / 4