Custom PDG Node in Python

   1177   2   0
User Avatar
Member
65 posts
Joined: May 2009
Offline
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
User Avatar
Member
8532 posts
Joined: July 2007
Online
since oiiotool is a shell command you can use Generic Generator to call it directly
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
65 posts
Joined: May 2009
Offline
Thanks! It works. I thought Generic Generator was just for generating work items and not for processing them.
  • Quick Links