[SOLVED] How to set output processor programatically

   2696   2   2
User Avatar
Member
59 posts
Joined: March 2014
Offline
How do we set an output processor on the USD ROP node in python? I just want to use the built-in "Use Search paths" processor, but I cannot figure out how to add it to the ROP with Python code.
Edited by flord - March 30, 2021 14:02:35
User Avatar
Member
112 posts
Joined: Oct. 2011
Offline
The outputprocessors parameter on the usdrop has a script callback defined: loputils.handleOutputProcessorAdd(kwargs)

So something like this should work in the python shell if you have a usd_rop1 in /stage:

kwargs={"node": hou.node("/stage/usd_rop1"), "parm": hou.parm("/stage/usd_rop1/outputprocessors"), "script_value": "useseachpaths"}
loputils.handleOutputProcessorAdd(kwargs)
Edited by simon_o - April 6, 2021 03:16:42
Pipeline @ RISE Visual Effects Studios
User Avatar
Member
59 posts
Joined: March 2014
Offline
I got it working with this.

kwargs = {"node": ropnode, "parm":  ropnode.parm("outputprocessors"), "script_value": "usesearchpaths"}
loputils.handleOutputProcessorAdd(kwargs)

I would not have found it in a timely manner without your help.
Thanks a lot!
F
  • Quick Links