We render some blend files over our renderfarm with multiple scenes in them.
We need this so we can do custom aov’s with override material in each scene.
The scenes are called:
“scene” (beauty & crypto)
“normal” (custom normal pass)
“fresnel” (custom fresnel pass)
After the rendering, we pack all of them into an exr.
So in the fresnel pass, I would like to change some settings for the walls, because I also render AO in this scene. So I want to turn the “Shadow” toggle of the walls to True, while the scene “fresnel” is rendering.
This works with this driver expression:
1 if bpy.context.scene.name == ‘Fresnel’ else 0
Now the problem is, that there are multiple warnings beneath the expression:
-Slow Python expression
-WARNING: Driver expression may not work correctly
-TIP: bpy.contex is not safe for renderfarm usage
And yes, the expression works perfectly while rendering in gui mode, but when rendering over command line obviously it doesn’t work.
So my question is, is there a way to write this in a different way, so it will work over a renderfarm?
I use this at every cmd line argument, so this shouldn be the problem.
bpy.context.preferences.filepaths.use_scripts_auto_execute = True
Cheers and thx