handling of output files in python processor

   1745   2   1
User Avatar
Member
53 posts
Joined: March 2014
Offline
Hi,
I have a ROP USD Output node that outputs a USD file for each work_item, and right after it I have a Python Processor node to modify the USD files using the python USD API. This Python Processor node generates new USD files on disk. When I right-click on the node and choose Delete this node's result from disk, nothing happens. It seems, the node is not aware of the files it generates. What do I need to do to make it work properly?

I already have this line at the end of the cook script.

work_item.updateResultData(0, outputPath, "file/geo/usd", 0, True)

Thanks.
User Avatar
Member
1737 posts
Joined: May 2006
Offline
You'll need to set expected result data too. From https://www.sidefx.com/docs/houdini/tops/pdg/WorkItem.html [www.sidefx.com] :



addExpectedResultData(result, tag, own=True)

Adds an expected result file to the work item with the specified file tag. result is the string path to the file that the work item will produce when it cooks.

The optional own parameter indicates whether the work item owns the file. PDG uses this parm when it deletes output files from disk.
http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
User Avatar
Member
53 posts
Joined: March 2014
Offline
Thanks Matt, works perfectly!
  • Quick Links