View Full Version : Throw an error on missing Start up Script
04-15-2008, 10:09 PM
I have a startup script that performs some operations using the prerender callbacks. My problem is that through backburner if that startup script is missing on a particular machine it will still render the frames, however, inaccurately. Is there a way to check for the script and cancel the job if it doesn't exist. Much like a missing plugin would do.
04-15-2008, 10:19 PM
From Maxscript Help:
Returns the size of the specified file in bytes. Returns 0 if the file could not be found.
04-15-2008, 10:23 PM
Another approach, also from the maxScript help:
Returns true if the file exists, false otherwise.
04-16-2008, 12:58 AM
Ok so where would I put this. Remember this is for render machines on backburner. How would I get the machine to execute this command. I'm guessing it would have to be saved with the file as a persistent global callback (if possible) or something, that runs when the file is opened on the render machine. Then it would have to tell backburner that the frame couldn't render and to take the machine off the job.
Hope this makes sense.
04-16-2008, 01:04 AM
I would recommend against the filesize method. I used it extensively in a script and it failed on occasion to identify that a file didn't exist.
04-16-2008, 03:37 PM
are you using mental ray? you can use the scripts section of the renderer to specify a script containing your operations to be performed before (or after if you like) the render starts.
If you put this script on a network location that all machines can see then it will be immaterial whether it is a startup script, or on the machine in question - backburner will look for the prerender script in the network location, perform the tweaks and render.
no need to specify the prerender callback, or looking if a file exists. just put the script commands in the file.
04-16-2008, 04:31 PM
You could put the #preRender Callback into the scene file prior to submital using the persistent function..
Callbacks.AddScript #preRender ("< your Script >") id:MyScript Persistent:true
Callbacks.AddScript #preRender ("filein \"MyScript.ms\"") id:MyScript Persistent:true
Where MyScript.ms is in a shared location...
The persistent true allows you to have unique scripts per submital...
04-16-2008, 04:31 PM
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.
vBulletin v3.0.5, Copyright ©2000-2015, Jelsoft Enterprises Ltd.