Reading output file path from /rendersettings using Python

   1052   2   1
User Avatar
Member
109 posts
Joined: Aug. 2017
Offline
I'm trying to get the final image render path, like this:

Redshift:
hou.node("/stage/somenode").stage().GetObjectAtPath("/Render/rendersettings.redshift:global:RS_outputFileName").Get()

Karma:
hou.node("/stage/somenode").stage().GetObjectAtPath("/Render/Products/renderproduct.productName").Get()

And as long as there isn't an $F4 in the path (for example, `$HIP/render.exr`), it will work and return an expanded path.
But if there is an $F4 in there(`$HIP/render.$F4.exr`), it returns `None`.

Is this normal? What can I try to make it work? Also, would it be possible to get this path unexpanded?

Tested on 20.0.590 and 20.5.312
User Avatar
Member
280 posts
Joined: Jan. 2015
Offline
You need to set a frame in the Get() because the attribute has time samples. If I remember correct.
Edited by Heileif - Sept. 7, 2024 05:59:44
User Avatar
Member
109 posts
Joined: Aug. 2017
Offline
@Heileif That worked! Amazing, thanks a lot.
  • Quick Links