Search - User list
Full Version: Custom PDG Node in Python
Root » PDG/TOPs » Custom PDG Node in Python
gadfly16
Hi Everyone,

I would like to process some images with `oiiotool`, and I decided to give it a try in TOPs.

My obviously naive approach was to:
  1. Make work items with the `filepattern` node
  2. Filter these with a custom `pythonprocessor`
  3. Run `oiiotool` with Python's subrocess module from `pythonscript`

Surprisingly enough it kind of works, but it's obvious that I don't do it the right way. If I run the subrocesses "in-process" then they are not governed by the scheduler, houdini just spawns all the workitems all at once. If I try to run it "out-of-process" then it chrashes with error "AttributeError: 'WorkItem' object has no attribute 'stringAttribute'", which was fine in process.

So it feels and seems like that I don't know what I'm doing. My question is: is there any documentation regarding custom command line tool integrations into TOPs?

Thanks in advance!
Mate
tamte
since oiiotool is a shell command you can use Generic Generator to call it directly
gadfly16
Thanks! It works. I thought Generic Generator was just for generating work items and not for processing them.
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