Houdini 20.5 Executing tasks with PDG/TOPs pdg

pdg.ScriptWorkItemData class

Custom work item data type for items that cook using a Python script

Inheritance

This object represents the data for a work item that cooks a Python script, for example work items created using the Python Script TOP node. It is a specialization of the basic pdg.WorkItemData class, and cinludes a serializad Python script in addition to regular work item attributes. Work items that use script data can be cooked using the Python Script Service, or the $HHP/pdgjob/pythonscript.py work item job script.

You can construct work items that store script data from Python. For example, adding following code in the Python Processor node’s onGenerate callback constructs a work item that runs Python code out of process:

new_item = item_holder.addWorkItem(typeName="scriptdata")
new_item.data.setScript("print('running custom script')")
new_item.setCommand("hython $HHP/pdgjob/pythonscript.py")

Methods

Methods from pdg.TypeInstance

Methods from pdg.WorkItemData

pdg

attributes

cooking

customtypes

  • pdg.Dictionary

    Wraps a nested dictionary object in Python, used with Dictionary Array attributes

data

debugging

events

exceptions

  • pdg.AttribError

    Generic exception raised when an error occurs when accessing work item attributes

  • pdg.CookError

    Generic exception raised when an error running the graph.

  • pdg.ServiceError

    Generic exception raised when an error occurs during a PDG service manager operation

expressions

  • pdg.EvaluationContext

    A module with global functions that operate on the thread-local evaluation context

internal

nodes

schedulers

services

types

workitems