HEGoAPI

Inherits: Object

Singleton entry point for HEGo session management and HDA discovery.

Description

This class owns the internal HEGoSessionManager, initializes the Houdini API platform layer, and exposes session controls to scripts.

The singleton is created during module initialization and is intended to be reused for the whole runtime.

It also stores hego/houdini_installation_path in Godot project settings. That path is used when filtering built-in Houdini libraries from get_hda_libraries().

Methods

Dictionary

get_hda_libraries()

String

get_houdini_installation_path() const

HEGoAPI

get_singleton() static

bool

is_session_active()

void

set_houdini_installation_path(path: String)

bool

start_session(connection_type: int, connection_data: String)

bool

stop_session()

int

poll_cook_state()


Method Descriptions

Dictionary get_hda_libraries() 🔗

Returns metadata for currently loaded non-built-in HDA libraries.

The dictionary is keyed by library name when available (otherwise by library id as a string).

Each value contains:

  • id: HAPI asset library id.

  • file_path: source library path.

  • name: basename without extension.

  • asset_count: number of available assets in the library.

  • assets: PackedStringArray of operator names.

Returns an empty dictionary if no session is active, if no libraries are loaded, or if querying HAPI fails.


String get_houdini_installation_path() const 🔗

Returns the configured Houdini installation path from project settings.


HEGoAPI get_singleton() static 🔗

Returns the global HEGoAPI singleton instance created during module initialization.


bool is_session_active() 🔗

Returns true when the Houdini Engine session is currently active.


void set_houdini_installation_path(path: String) 🔗

Updates the hego/houdini_installation_path project setting.


bool start_session(connection_type: int, connection_data: String) 🔗

Starts a Houdini Engine session and initializes HAPI.

connection_type maps to HEGoSessionManager::SessionType:

1 = InProcess
2 = NewNamedPipe
3 = NewTCPSocket
4 = ExistingNamedPipe
5 = ExistingTCPSocket
6 = ExistingSharedMemory

connection_data is transport-specific (for example named pipe string or socket endpoint data).

Returns true on successful session startup and initialization.


bool stop_session() 🔗

Stops the active Houdini Engine session and releases session resources.

Returns true when shutdown succeeds.


int poll_cook_state() 🔗

Returns the current HAPI cook status as an integer.

Used together with HEGoAssetNode.cook_async() to poll for cook completion each frame. The returned value maps to HAPI_State:

0 = HAPI_STATE_READY          (cook finished successfully)
1 = HAPI_STATE_READY_WITH_FATAL_ERRORS
2 = HAPI_STATE_READY_WITH_COOK_ERRORS
3 = HAPI_STATE_MAX_READY_STATE
4 = HAPI_STATE_STARTING_COOK
5 = HAPI_STATE_COOKING
6 = HAPI_STATE_STARTING_LOAD
7 = HAPI_STATE_LOADING
8 = HAPI_STATE_MAX

Values greater than 3 indicate that HAPI is still busy. Typical polling pattern in GDScript:

hego_asset_node.cook_async()
while HEGoAPI.get_singleton().poll_cook_state() > 3:
    await get_tree().process_frame

Class Registration

  • Kind: Concrete