How to use pdg_logoutput of ROP Fetch?

   2035   1   0
User Avatar
Member
692 posts
Joined: Aug. 2019
Offline
According to the document (https://www.sidefx.com/docs/houdini/nodes/top/ropfetch.html):

Oftentimes a custom driver node will write out several files which are not automatically picked up as output files by PDG.

However, if you give the driver node a toggle parameter named pdg_logoutput, and you toggle that parameter to true before it is cooked by the ROP Fetch, then its printed output will be parsed for lines that match the pattern OUTPUT_FILE:{file_path}; and each matched file_path will become output files for the ROP Fetch work items.

What does it actually mean? Every single sentence sounds ambiguous to me. "its printed output"? Whose printed output? The ROP itself? The toggle's callback script? And where does it have to print to? A .txt file?

Does anyone have a working example showing how to use this feature?
User Avatar
Member
151 posts
Joined: June 2019
Online
This is for custom drivers when you want to support your driver to be used by ROP Fetch.

For example I have a wrapper around sbsrender (command line renderer by substance designer) which is a rop. In essence it's just a gui around it. So if you run it usually it spits several files, not just one.

If you want to use it in top network you need an interface to tell it what exactly you did so the ROP Fetch can fill @pdg_output and you can use files downstream (may be you want chain sbsrenders for example or do something else with the outputs).

So this is the interface by convention. ROP Fetch just check for the pdg_logoutput toggle parm (it's your responsibility to provide it) and then just parse stdout for the pattern. For python scripts you can simply just print it.

The script used by my driver is here: https://github.com/igor-elovikov/hipie/blob/main/scripts/python/hipie/sbsar.py [github.com] though there's a lot of sbsar related stuff. The part with output is literally last ten lines. I'm just printing the rendered file paths so the output look like this
OUTPUT_FILE:{d:/temp/out/metal_diffuse.png};
OUTPUT_FILE:{d:/temp/out/metal_roughness.png};
OUTPUT_FILE:{d:/temp/out/metal_ao.png};
etc
  • Quick Links