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, socket, or shared memory) can be auto-terminated as well if told so when starting
the server. See crate::server::start_engine_server together with the transport helpers
crate::server::connect_to_pipe_server, crate::server::connect_to_socket_server, and
crate::server::connect_to_memory_server.
Helper constructors terminate 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::server::ServerOptions;pub use crate::stringhandle::StringArray;
Structs§
- Compositor
Options - Cook
Options - Documentation
- Hapi
Result Code - Image
File Format - Node
Builder - Builder struct for
Session::node_builderAPI - Session
- Session represents a unique connection to the Engine instance and all API calls require a valid session.
It implements
Cloneand isSendandSync - Session
Info - Configurations for sessions. Note: For async attribute access, make sure to set connection_count to at least 1.
- Session
Options - Session options passed to session create functions like
crate::server::connect_to_pipe_server - Session
Sync Info - Thrift
Server Options - Options to configure a Thrift server being started from HARC.
- Timeline
Options - Uninitialized
Session - Viewport
Enums§
- Attribute
Owner - Attribute
Type Info - Cache
Property - Choice
List Type - Cook
Result - Result of async cook operation
Session::cook - Curve
Orders - Curve
Type - EnvInt
Type - GeoType
- Group
Type - Hapi
Error - Error type returned by all APIs
- Hapi
Result - Height
Field Sampling - Image
Data Format - Image
Packing - Input
Type - JobStatus
- 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§
- new_
in_ process_ session - Create an in-process session.
Usefull for quick testing and debugging. Session crash will crash the main process.
For production use, use
new_thrift_sessioninstead. - new_
thrift_ session - Start a Thrift server and initialize a session with it.
- simple_
session - Shortcut for creating a simple Thrift session with good defaults.