Can a pre-frame script edit the render settings?

   1312   2   0
User Avatar
Member
14 posts
Joined: Jan. 2021
Offline
In the same vein as https://www.sidefx.com/forum/topic/81229 [www.sidefx.com]
I have a preframe script that does a frame substitution on an attribute value but it's not being saved after the script is run.

Part of the USD file being rendered:
custom string ri:samplefilter0:name = "PxrCryptomatte"
custom string ri:samplefilter0:PxrCryptomatte:filename = "/path/to/render/dir/cryptomatte/renderproduct.cryptomatte.$F.exr"

I'm attempting to replace $F with the current frame from hou.frame() but the cryptomatte exr is still being written out with $F in it instead of the actual frame number.
I've confirmed the attribute value is being set on the stage by getting the attribute again and printing it.

Any help please?

Thanks
Michael
User Avatar
Member
14 posts
Joined: Jan. 2021
Offline
Related question on why I'm running the preframe script: https://www.sidefx.com/forum/topic/82522/ [www.sidefx.com]
User Avatar
Member
12474 posts
Joined: July 2005
Offline
Yes, I believe it can.
Jason Iversen, Technology Supervisor & FX Pipeline/R+D Lead @ Weta FX
also, http://www.odforce.net [www.odforce.net]
  • Quick Links