[Closed] Post-Render Scripts and Netrenders
Is my conclusion accurate that Post-Render Scripts don’t execute when you use Backburner?
Is there a work around?
hmmm, there probably is a work around but we’d probably need to know a bit more about wht it is that you’re trying to achieve!
J.
post render script works with backburner, you should have this script in the scripts directory on all servers or use include maps when sending job
I have a script that strips the 0000 out of render file names if I only render one frame. If I execute it after a net-render finishes it works perfectly.
An immediate solution would be: “How does one have Backburner not add #### to all frames rendered?”
files = #()
renderfiles = undefined
try (renderfiles = ((getFilenamePath rendOutputFilename)+"*"+(getFilenameType rendOutputFilename)))
catch ()
if rootdir != undefined then
(
files = getfiles renderfiles
for f in files do
(
n = ""
fname = getfilenamefile rendoutputfilename
print (substring (getfilenamefile f) 1 fname.count)
print (substring f (f.count-7) (4))
if substring (getfilenamefile f) 1 fname.count == fname and substring f (f.count-7) (4) == "0000" then
(
n = replace f (f.count-7) (4) ""
renamefile f n
)
else
(
)
)
)
else ()
just a thought, are you using the post render script section in the render settings? If so, try using a #postRender callback instead, or failing that, a try a #postRenderFrame callback
I had the exact same issue wth the naming and I couldn’t make the postrender callbacks work. Haven’t tried it in max 9 though…
So would I then set my script to run on startup in the render nodes? Otherwise the callback would never be declared.
if you assign the ‘persistent’ paremeter to be true, the callback is saved with the file and registered whenever the file is opened.
I haven’t tried this myself and vasilescu_anton did say he couldnt get the postRender callbacks to work but you may aswell give it a shot. should be quick to set up
ok i was bored so i got it working for you.
Firstly i modified the script you provided. I’m not sure if it was a typo or you have it defined somewhere else but i replaced if ‘rootdir’ != undefined with if renderfiles != undefined.
Then i saved the script in the scripts directory as ‘remove0000.ms’
Then registered a postRender callback using the following:
callbacks.removeScripts id:#postRenderRename
callbacks.addScript #postRender fileName:((getDir #scripts) + "\\remove0000.ms") id:#postRenderRename persistent:true
Then saved the file and sent it off to backburner. Worked like a charm.
NOTE: you will need to modify your script if you are doing this multiple times because the next time there will already be a file without the ‘0000’ so when you try to rename the new render, it will fail the renaming part because it will not overwrite the existing file. So all you have to do is throw in a deleteFile somewhere appropriate like just before the renameFile and you should be set
I tested in max 8
Let me know if it still doesnt work for you
Thanks Joel I’ll give it a try at work tommorow.
The code I posted was actually just half the script since I wanted to keep it simple for anybody trying to debug. haha guess I reduced it a bit too far and forgot to relink some variables.