Notifications
Clear all

[Closed] Script to switch off Distributed Rendering when hitting Net Render

Is there a way to influence vray render buttons via maxscript?

because i have a silly idea based on THIS problem:

some render artist often render previews with distributed rendering. in the heat of the production process those scenes find their way to the render farm via net render…BUT in case distributed rendering is still active by mistake those jobs cause an unhandled exception and crash.
so i wanna enforce the renderer to scwitch of distributed rendering when net render is active.

if there´s a script or if someone could help me creating it this would bring a lil´ more peace to the world and would calm my nerves 😮

regards

anselm

2 Replies

Give this a try… toss it in a anything.ms file in the scripts/startup folder of a slave and give it a go.


  callbacks.removescripts id:#netrender_anti_dr
  
  txt =  "if (isnetserver() == true) then"
  txt += "(
"
  txt += "	if (matchpattern (renderers.current as string) pattern:\"*Vray*\") then
"
  txt += "	(
"
  txt += "		if (renderers.current.system_distributedRender == true) do
"
  txt += "		(
"
  txt += "			renderers.current.system_distributedRender = false
"
  txt += "		)
"
  txt += "	)
"
  txt += ")
"
  
  callbacks.addscript #preRender txt id:#netrender_anti_dr
  
  

haven’t tried this yet though, but it sounds good in my head may want to try a normal DR also, i dont think it would interfere with the slave process, but who knows.

hy Vsai!

thanks for the fast reply much apprechiate that!

i tried it as a pre-render script but the farm responded an unhandled exeption…

i saved the src-code as a MaxScript at a location where all slaves should reach it and declared it as a pre-render script. then i hit the render button with netrender checked and distributed rendering checked as well to test it.

dunno but maybe i´m doing something terrebly worng :sad::shrug:

cheers

anselm