Houdini 18.0 Executing Tasks

pdg package

The classes and functions in the Python pdg package for working with dependency graphs.

On this page

Package-level functions

The following top-level attribute functions are designed to be used in Python expressions. You can use pdg.workItem() to get the current work item object in a Python expression. The top-level function floatData(work_item, "foo", 0) is equivalent to work_item.floatAttribValue("foo", 0), which is equivalent to the HScript expression @foo.





Expression functions







  • 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.EvaluationContext

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




  • pdg.TypeRegistry

    Object containing registry of all custom node, work item, and scheduler types

  • pdg.language

    The enumeration of languages used to define custom PDG types

  • pdg.registeredType

    The type of object when registering a custom class with PDG

  • pdg.result

    The return type of a node callback implementation

  • pdg.scheduleResult

    The return type of a scheduler’s onScheduler callback implementation

  • pdg.tickResult

    The return type of a onTick callback


Executing Tasks


Next steps

  • Running external programs

    How to wrap external functionality in a TOP node.

  • File tags

    Work items track the "results" created by their work. Each result is tagged with a type.

  • Feedback loops

    You can use for-each blocks to process looping, sequential chains of operations on work items.

  • Command servers

    Command blocks let you start up remote processes (such as Houdini or Maya instances), send the server commands, and shut down the server.

  • TOP Service Manager

    The TOP Service Manager manages pools of persistent Houdini sessions that can be used to reduce work item cooking time

  • Integrating PDG with render farm schedulers

    How to use different schedulers to schedule and execute work.

  • Visualizing work item performance

    How to visualize the relative cook times (or file output sizes) of work items in the network.

  • Event handling

    You can register a Python function to handle events from a PDG node or graph

  • Tips and tricks

    Useful general information and best practices for working with TOPs.


  • All TOPs nodes

    TOP nodes define a workflow where data is fed into the network, turned into "work items" and manipulated by different nodes. Many nodes represent external processes that can be run on the local machine or a server farm.

  • Processor Node Callbacks

    Processor nodes generate work items that can be executed by a scheduler

  • Partitioner Node Callbacks

    Partitioner nodes group multiple upstream work items into single partition

  • Scheduler Node Callbacks

    Scheduler nodes execute work items

  • Python API

    The classes and functions in the Python pdg package for working with dependency graphs.