[SOLVED] How to set output processor programatically

   2057   2   2
User Avatar
Member
59 posts
Joined: 3月 2014
オフライン
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 - 2021年3月30日 14:02:35
User Avatar
Member
112 posts
Joined: 10月 2011
オフライン
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 - 2021年4月6日 03:16:42
Pipeline @ RISE Visual Effects Studios
User Avatar
Member
59 posts
Joined: 3月 2014
オフライン
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