Skip to main content

A object-oriented python wrapper for houdini engine's C API

Project description

pyhapi

Object-Oriented Python Wrapper for Houdini Engine's C API

Install

1. setup PATH

  • For Windows
    Add C:\Program Files\Side Effects Software\Houdini <version>\custom\houdini\dsolib to Environment Path
  • For Linux
    Add /opt/hfs<version>/dsolib/ to LD_LIBRARY_PATH
    Example:
    export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/hfs17.5/dsolib/

2. install through PyPI

$ pip install pyhapi

Supported Platforms

  • Windows
  • Linux

Dependency

  • Python: >3.6
  • Numpy: >= 1.15
  • Houdini: 17.5
    • License supported:
      • Houdini FX
      • Houdini Core
      • Houdini Engine
    • License NOT supported:
      • Houdini Engine Indie
      • Houdini Indie
      • Houdini Apprentice

Features

  • Instantiate node/HDA
  • Node connect operation
  • Node parameter get/set
  • Node async cooking
  • Marshall in/out curve
  • Marshall in/out mesh

Following feature in Houdini Engine is NOT supported yet:

  • Marshall in/out volume
  • PDG execution

Example Usage

Create a session

import pyhapi as ph
session = ph.HSessionManager.get_or_create_default_session()

See more in
Example: node_networks_operations

Instantiate a HDA

hda_asset = ph.HAsset(session, "hda/FourShapes.hda")
asset_node = hda_asset.instantiate(node_name="TestObject").cook()

Set parameter of node

asset_node.set_param_value("seed", 1.0)
asset_node.set_param_value("foo_attrib", "foo_str")
asset_node.press_button("foo_execute")

See more in
Example: hda_params_getset

Save HIP file

session.save_hip("debug.hip")

Marshall data

see more in
Example: curve_marshall_input
Example: curve_marshall_output
Example: mesh_marshall_input
Example: mesh_marshall_output

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyhapi-0.0.1b0.tar.gz (24.0 kB view hashes)

Uploaded Source

Built Distribution

pyhapi-0.0.1b0-py3-none-any.whl (26.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page