Skip to main content

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

Project description

pyhapi

Downloads

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

Documentation

Please visit pyhapi documentation.

Install

You could use either (a) pip or (b) clone and install.

option a.1 setup PATH

  • For Windows, run
    powershell ./sethoupath.ps1
    it should add houdini's dsolib and bin directory to PATH.
  • For Linux
    Add /opt/hfs<version>/dsolib/ to LD_LIBRARY_PATH
    Example:
    export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/hfs17.5/dsolib/

option a.2 install through PyPI

$ pip install pyhapi

option b

Clone this repo and run python setup.py install

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
  • Marshall in/out heightfield

Following feature in Houdini Engine is NOT supported yet:

  • Marshall in/out volume
  • PDG execution

Example Usage

Please see documentation for detailed tutorial. ****

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
Example: heightfield_marshal_input
Example: heightfield_marshal_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.2b2.tar.gz (30.3 kB view details)

Uploaded Source

Built Distributions

pyhapi-0.0.2b2-py3.7.egg (78.7 kB view details)

Uploaded Egg

pyhapi-0.0.2b2-py3-none-any.whl (34.9 kB view details)

Uploaded Python 3

File details

Details for the file pyhapi-0.0.2b2.tar.gz.

File metadata

  • Download URL: pyhapi-0.0.2b2.tar.gz
  • Upload date:
  • Size: 30.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/47.1.1.post20200604 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.0

File hashes

Hashes for pyhapi-0.0.2b2.tar.gz
Algorithm Hash digest
SHA256 99cd7f2c07583d4e3adbd8dac2a766b4cf0fcb56ac96612c246f38a37ecfa3c9
MD5 da2f824dc0ce3df006cb1a7bb4b80f66
BLAKE2b-256 f71eaf1657773b84469cca9cc22752caf949f57f2d8dd18bb9da2ef7ef1d9050

See more details on using hashes here.

File details

Details for the file pyhapi-0.0.2b2-py3.7.egg.

File metadata

  • Download URL: pyhapi-0.0.2b2-py3.7.egg
  • Upload date:
  • Size: 78.7 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/47.1.1.post20200604 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.0

File hashes

Hashes for pyhapi-0.0.2b2-py3.7.egg
Algorithm Hash digest
SHA256 8dcc3f185843a0f0d678fc7c1cef08ce33060aae487c2d71e5d4f53f4f17711e
MD5 603b4c64d31350476e549a5c7649496c
BLAKE2b-256 25d10b2b60644ea4368cbd8ce212e5e06c57ccd1f1ca8537ed24a8d7a81a4b7b

See more details on using hashes here.

File details

Details for the file pyhapi-0.0.2b2-py3-none-any.whl.

File metadata

  • Download URL: pyhapi-0.0.2b2-py3-none-any.whl
  • Upload date:
  • Size: 34.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/47.1.1.post20200604 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.0

File hashes

Hashes for pyhapi-0.0.2b2-py3-none-any.whl
Algorithm Hash digest
SHA256 d414a89f8fe4dbf63f0872c2a856d1bb081c154f1c6063eae37670be7ced9054
MD5 77c4b4d143045a05cc5ae58f8eef13fc
BLAKE2b-256 1c25d02c79403e6238ab34ddf1ffadec23c1b8405f401b4cfb528cd8e09d7c89

See more details on using hashes here.

Supported by

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