Taylor Petrick

tpetrick

About Me

Expertise
Not Specified
Location
Canada
Website

Connect

My Tutorials

obj-image Quick Tips
Work Item Attributes

Recent Forum Posts

Geometry attributes inside TOPS May 28, 2020, 6:06 p.m.

The issue with copying string arrays to work item attributes is fixed in today's daily build, so you should be able to import your tags attribute without needing the work around.

pythonscript to press button on node per work item May 28, 2020, 6:04 p.m.

The pdg.WorkItem.makeActive context manager actually only works when used during a PDG cook, but there's no real reason for that to be the case. I've fixed it so that starting with tomorrow's daily build you'll be able to use it outside of a cook as well. For example, you'll be able to do something like the following from the Python Shell:

top_node = hou.node('/obj/topnet1/genericgenerator1')
pdg_node = top_node.getPDGNode()
for work_item in pdg_node.workItems:
    with work_item.makeActive():
        print(top_node.parm('pdg_command').eval())

In that example I'm evaluating a parm which has a work item @attribute expression in it, and therefore needs an active work item to evaluate against.

The TOP node itself also has methods for selecting a work item in the UI, but that's specifically for UI interaction (see https://www.sidefx.com/docs/houdini/hom/hou/TopNode.html).

pythonscript to press button on node per work item May 28, 2020, 2:43 p.m.

Yep, there's an existing RFE to add a job parm to the in process scheduler that lets a work item run on the main thread. Single just means only one work item of that type can run at a time, but the work item still runs on a background thread.