I have a preRender callback script that check for a few variables before render, is there a way to stop vray render if those conditions are not met? Looking through the vray maxscript documentation I can only find a method for IPR rendering but not regular non-interactive version.
Yeah I had similar needs a while back and couldnt find anything either (didnt want to go down the .NET rabit hole)
Ended up just calling a 5 second timer counting down and a message for the user to maually press the cancel (or escape) button before timer reach 0
Hmm, I was hoping this was not the case. In my case I can’t wait for the user to press cancel as the render would hang up 3dsmax, I just need it to not start in the first place.
The Max UI is locked during rendering, so any script wouldn’t execute.
Could you be more specific as to the case you’re facing? Are you writing a sanity checker?
Essentially that is the case. I’m writing some standardized callback scripts to deploy here at the office. There is a bug in vray or max where if a physical camera has a modifier applied to it, max fill just hang indefinitely when rendering. I’m trying to check for that, with network rendering i can use a pre-submission script to check for that with local rendering - i’m not sure what to do.
Nothing at rendertime i can think of.
What i could think of is one of two things:
a) The simplest solution is to run the sanity check independently. Provided it warns users (or even auto-fixes the issues), then starting a render could be avoided.
b) Similarly to the above, make your own render button which in actual fact first runs the sanity checker, and only if that is passed (or fixed) the render command is issued.
You’d have to instruct users to run your tools, rather than resort to the usual workflows, but if the little effort is worth it, you shouldn’t find it difficult. ![]()
Notice this is also how Deadline works (or used to.): if its sanity checker finds issues, it allows the user to either rectify them (for the “yellow” ones) or warns the user to not start a render (for the “red” ones).
Provided the message to not start the render is clear, responsibility should then transfer to individual users in case someone decided to ignore it (speaking as a concerned T.D., eheh).