Module session

Module session 

Source
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§

CompositorOptions
CookOptions
Documentation
HapiResultCode
ImageFileFormat
NodeBuilder
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 is Send and Sync
SessionInfo
Configurations for sessions. Note: For async attribute access, make sure to set connection_count to at least 1.
SessionOptions
Session options passed to session create functions like crate::server::connect_to_pipe_server
SessionSyncInfo
ThriftServerOptions
Options to configure a Thrift server being started from HARC.
TimelineOptions
UninitializedSession
Viewport

Enums§

AttributeOwner
AttributeTypeInfo
CacheProperty
ChoiceListType
CookResult
Result of async cook operation Session::cook
CurveOrders
CurveType
EnvIntType
GeoType
GroupType
HapiError
Error type returned by all APIs
HapiResult
HeightFieldSampling
ImageDataFormat
ImagePacking
InputType
JobStatus
License
PackedPrimInstancingMode
ParmType
PartType
PdgEventType
PdgState
PdgWorkItemState
Permissions
PresetType
PrmScriptType
RSTOrder
RampType
SessionEnvIntType
SessionType
State
StatusType
StatusVerbosity
StorageType
TransformComponent
VolumeType
VolumeVisualType
XYZOrder

Traits§

EnvVariable
Trait bound for Session::get_server_var() and Session::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_session instead.
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.

Type Aliases§

LicenseType
Result
SessionState