Can a husk prerender-script affect render settings?

   1191   1   1
User Avatar
Member
7 posts
Joined: Aug. 2021
Offline
I'm not sure if this is something on the VRay side or the Husk/SideFX side.

I have a prerender script that modifies an attribute on my global settings.
Specifically, in VRay, it is the file path to the deep render node, and I won't know this path until the job lands on a machine on the render farm.

From the VRay output, it looks like it's using the deep render path that is specified in the usd file in the render settings.
In fact, the printout of the render settings have the bad path, as well as an attribute for "batchCommandLine" which includes the --prerender-scripts arg.
I can see in the log, it is printing my debugging line:
Setting prim Usd.Prim(</Render/settings/global>) attribute_name vray:OutputDeepWriter_file to value /var/tmp/TMP_RACE_KX-YQ_0001A/deep.0001.exr

But later in the printout, it includes
"vray:OutputDeepWriter_file":"deep.0001.deep.exr",

indicating it is not using the value I'm setting it to.

(This script works with redshift, where the deep path is specified in a RenderVar instead of a RenderSettings node.)

I was wondering if the render settings specified in the husk command line is locked before the prerender script is run?
In the docs, I didn't see any indication that prerender-scripts can't affect render settings?
User Avatar
Staff
4159 posts
Joined: Sept. 2007
Offline
As far as I know anything on the stage is fair-game in the pre-render scripts; this snippet worked for me:

attr = stage.GetAttributeAtPath("/Render/Products/renderproduct.productName")
attr.Set("/tmp/changed_name.exr")

Maybe it's something to do with VRay, or some sneaky typo perhaps?
I'm o.d.d.
  • Quick Links