Python Processor command parameter (scheduling problems)

   1478   2   1
User Avatar
Member
15 posts
Joined: Oct. 2015
Offline
Hi,

I'm trying to get to grips with Python Processor TOP. I'm doing a simple ROP Geometry Sample clone that manually creates the ROP geometry node and renders it all inside the onCookTask function. I am using a Tractor scheduler but no matter what I put in the “Command” parameter of the Python Processor it does not seem to schedule. The parm's help says if left blank the work items are not scheduled so I'm guessing I might be using the wrong format or something.

Setting the new work items the processor creates to “inProcess” cooks and runs okay, so I'm confident the Python source itself is solid.

Any ideas?

Cheers,

Matt
Matt Traynar

Lead Software Developer @ MPC
User Avatar
Staff
616 posts
Joined: May 2014
Offline
The onCookTask callback code is for running work items in process. It won't use the scheduler because it's not scheduled as a standalone process. If you want to run a work item out of process, you should leave “inProcess” disabled and save the code you want to run to an external Python file. Also, make sure to set the command on the work item using something like the following:

work_item = item_holder.addWorkItem()
work_item.setCommand(self["command"].evaluateString())
User Avatar
Member
15 posts
Joined: Oct. 2015
Offline
It was that final step of setting the command on the work item after it gets created that I was missing. Thanks!
Matt Traynar

Lead Software Developer @ MPC
  • Quick Links