Expand description
Session is responsible for communicating with HAPI
The Engine promises
to be thread-safe when accessing a single Session
from multiple threads.
hapi-rs
relies on this promise and the Session struct holds only an Arc
pointer to the session,
and does not protect the session with Mutex, although there is a ReentrantMutex
private member which is used internally in a few cases where API calls must be sequential.
When the last instance of the Session
is about to get dropped, it’ll be cleaned up
(if SessionOptions::cleanup was set) and automatically closed.
The Engine process (pipe or socket) can be auto-terminated as well if told so when starting the server: See start_engine_pipe_server and start_engine_socket_server
quick_session terminates the server by default. This is useful for quick one-off jobs.
Re-exports§
pub use crate::asset::AssetLibrary;
pub use crate::node::HoudiniNode;
pub use crate::node::ManagerNode;
pub use crate::node::ManagerType;
pub use crate::node::NodeHandle;
pub use crate::node::NodeType;
pub use crate::node::Transform;
pub use crate::parameter::Parameter;
pub use crate::stringhandle::StringArray;
Structs§
- Compositor
Options - Cook
Options - Documentation
- Hapi
Error - Error type returned by all APIs
- Image
File Format - Node
Builder - Builder struct for
Session::node_builder
API - Session
- Session represents a unique connection to the Engine instance and all API calls require a valid session.
It implements
Clone
and isSend
andSync
- Session
Info - Configurations for sessions
- Session
Options - Session options passed to session create functions like
connect_to_pipe
- Session
Options Builder - A build for SessionOptions.
- Session
Sync Info - Thrift
Server Options - Options to configure a Thrift server being started from HARC.
- Timeline
Options - Viewport
Enums§
- Attribute
Owner - Attribute
Type Info - Cache
Property - Choice
List Type - Connection
Type - By which means the session communicates with the server.
- Cook
Result - Result of async cook operation
Session::cook
- Curve
Orders - Curve
Type - EnvInt
Type - GeoType
- Group
Type - Hapi
Result - Height
Field Sampling - Image
Data Format - Image
Packing - Input
Type - JobStatus
- Kind
- License
- Packed
Prim Instancing Mode - Parm
Type - Part
Type - PdgEvent
Type - PdgState
- PdgWork
Item State - Permissions
- Preset
Type - PrmScript
Type - RSTOrder
- Ramp
Type - Session
EnvInt Type - Session
Type - State
- Status
Type - Status
Verbosity - Storage
Type - Transform
Component - Volume
Type - Volume
Visual Type - XYZOrder
Traits§
- EnvVariable
- Trait bound for
Session::get_server_var()
andSession::set_server_var()
Functions§
- connect_
to_ memory_ server - connect_
to_ pipe - Connect to the engine process via a pipe file.
If
timeout
is Some, function will try to connect to the server multiple times every 100ms untiltimeout
is reached. Note: Default SessionOptions create a blocking session, non-threaded session, useSessionOptionsBuilder
to configure this. - connect_
to_ socket - Connect to the engine process via a Unix socket
- new_
in_ process - Create in-process session
- quick_
session - A quick drop-in session, useful for on-off jobs It starts a single-threaded shared memory server and initialize a session with default options
- start_
engine_ pipe_ server - Spawn a new pipe Engine process and return its PID
- start_
engine_ socket_ server - Spawn a new socket Engine server and return its PID
- start_
houdini_ server - Start an interactive Houdini session with engine server embedded.
- start_
shared_ memory_ server - Spawn a new Engine server utilizing shared memory to transfer data.