Search - User list
Full Version: handling of output files in python processor
Root » PDG/TOPs » handling of output files in python processor
flord
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.
mestela
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.
flord
Thanks Matt, works perfectly!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB