I'm working on an HDA (at the OBJ level) that contains a number of geometry SOPs, materials and render presets using TOPs. I'd like to use a pre-render script on a ROP USD Output TOP to set a parameter on the HDA itself before outputting.
Some info:
The parameter I would like to set is called "disablesim".
The USD Output TOP is two levels deep inside the HDA.
The HDA is named "main".
My assumption is that this would work as a pre-render script:
hou.node("../..").parm("disablesim").set(0)
... but it gives me an error:
AttributeError: 'NoneType' object has no attribute 'set'
An absolute reference works:
hou.node("/obj/main").parm("disablesim").set(0)
But I can't use it for a few reasons:
The HDA isn't always at the same path, nor is it always named the same way.
There is some process happening in Houdini that converts the path to relative every time I save the hip or HDA, which breaks the reference at render time.
How do I set the value of a parameter in a pre-render script inside a topnet?