pub struct Session { /* private fields */ }
Expand description
Implementations
sourceimpl Session
impl Session
sourcepub fn set_server_var<T: EnvVariable + ?Sized>(
&self,
key: &str,
value: &T::Type
) -> Result<()>
pub fn set_server_var<T: EnvVariable + ?Sized>(
&self,
key: &str,
value: &T::Type
) -> Result<()>
Set environment variable on the server
sourcepub fn get_server_var<T: EnvVariable + ?Sized>(
&self,
key: &str
) -> Result<<T::Type as ToOwned>::Owned>
pub fn get_server_var<T: EnvVariable + ?Sized>(
&self,
key: &str
) -> Result<<T::Type as ToOwned>::Owned>
Get environment variable from the server
sourcepub fn get_server_variables(&self) -> Result<StringArray>
pub fn get_server_variables(&self) -> Result<StringArray>
Retrieve all server variables
sourcepub fn initialize(&mut self, opts: &SessionOptions) -> Result<()>
pub fn initialize(&mut self, opts: &SessionOptions) -> Result<()>
Initialize session with options
sourcepub fn cleanup(&self) -> Result<()>
pub fn cleanup(&self) -> Result<()>
Cleanup the session. Session will not be valid after this call and needs to be initialized again
sourcepub fn is_initialized(&self) -> bool
pub fn is_initialized(&self) -> bool
Check if session is initialized
sourcepub fn create_input_node(&self, name: &str) -> Result<Geometry>
pub fn create_input_node(&self, name: &str) -> Result<Geometry>
Create an input geometry node which can accept modifications
sourcepub fn create_input_curve_node(&self, name: &str) -> Result<Geometry>
pub fn create_input_curve_node(&self, name: &str) -> Result<Geometry>
Create an input geometry node with crate::enums::PartType
set to Curve
sourcepub fn create_node<'a>(
&self,
name: impl AsRef<str>,
label: impl Into<Option<&'a str>>,
parent: Option<NodeHandle>
) -> Result<HoudiniNode>
pub fn create_node<'a>(
&self,
name: impl AsRef<str>,
label: impl Into<Option<&'a str>>,
parent: Option<NodeHandle>
) -> Result<HoudiniNode>
Create a node. name
must start with a network category, e.g, “Object/geo”, “Sop/box”
New node will not be cooked.
sourcepub fn save_hip(&self, name: &str, lock_nodes: bool) -> Result<()>
pub fn save_hip(&self, name: &str, lock_nodes: bool) -> Result<()>
Save current session to hip file
sourcepub fn load_hip(&self, name: &str, cook: bool) -> Result<()>
pub fn load_hip(&self, name: &str, cook: bool) -> Result<()>
Load a hip file into current session
sourcepub fn merge_hip(&self, name: &str, cook: bool) -> Result<i32>
pub fn merge_hip(&self, name: &str, cook: bool) -> Result<i32>
Merge a hip file into current session
sourcepub fn load_asset_file(&self, file: impl AsRef<str>) -> Result<AssetLibrary>
pub fn load_asset_file(&self, file: impl AsRef<str>) -> Result<AssetLibrary>
Load an HDA file into current session
sourcepub fn get_status(&self, flag: StatusType) -> Result<State>
pub fn get_status(&self, flag: StatusType) -> Result<State>
Get session state of a requested [create::enums::StatusType
]
sourcepub fn is_cooking(&self) -> Result<bool>
pub fn is_cooking(&self) -> Result<bool>
Is session currently cooking. In non-threaded mode always returns false
pub fn is_valid(&self) -> bool
sourcepub fn get_status_string(
&self,
status: StatusType,
verbosity: StatusVerbosity
) -> Result<String>
pub fn get_status_string(
&self,
status: StatusType,
verbosity: StatusVerbosity
) -> Result<String>
Get the status message given a type and verbosity
sourcepub fn get_cook_result_string(
&self,
verbosity: StatusVerbosity
) -> Result<String>
pub fn get_cook_result_string(
&self,
verbosity: StatusVerbosity
) -> Result<String>
Get session cook result status as string
sourcepub fn cooking_total_count(&self) -> Result<i32>
pub fn cooking_total_count(&self) -> Result<i32>
How many nodes need to cook
sourcepub fn cooking_current_count(&self) -> Result<i32>
pub fn cooking_current_count(&self) -> Result<i32>
How many nodes have already cooked
sourcepub fn cook(&self) -> Result<CookResult>
pub fn cook(&self) -> Result<CookResult>
In threaded mode wait for Session finishes cooking. In single-thread mode, immediately return See Documentation
sourcepub fn get_connection_error(&self, clear: bool) -> Result<String>
pub fn get_connection_error(&self, clear: bool) -> Result<String>
Retrieve connection error if could not connect to engine instance
sourcepub fn lock(&self) -> ReentrantMutexGuard<'_, ()>
pub fn lock(&self) -> ReentrantMutexGuard<'_, ()>
Lock the internal reentrant mutex. Should not be used in general, but may be useful in certain situations when a series of API calls must be done in sequence
sourcepub fn set_timeline_options(&self, options: TimelineOptions) -> Result<()>
pub fn set_timeline_options(&self, options: TimelineOptions) -> Result<()>
Set Houdini timeline options
sourcepub fn get_timeline_options(&self) -> Result<TimelineOptions>
pub fn get_timeline_options(&self) -> Result<TimelineOptions>
Get Houdini timeline options
sourcepub fn set_use_houdini_time(&self, do_use: bool) -> Result<()>
pub fn set_use_houdini_time(&self, do_use: bool) -> Result<()>
Set session to use Houdini time
sourcepub fn get_viewport(&self) -> Result<Viewport>
pub fn get_viewport(&self) -> Result<Viewport>
Get the viewport(camera) position
sourcepub fn set_viewport(&self, viewport: &Viewport) -> Result<()>
pub fn set_viewport(&self, viewport: &Viewport) -> Result<()>
Set the viewport(camera) position
sourcepub fn get_sync_info(&self) -> Result<SessionSyncInfo>
pub fn get_sync_info(&self) -> Result<SessionSyncInfo>
Get session sync info
sourcepub fn set_sync_info(&self, info: &SessionSyncInfo) -> Result<()>
pub fn set_sync_info(&self, info: &SessionSyncInfo) -> Result<()>
Set session sync info
sourcepub fn get_license_type(&self) -> Result<License>
pub fn get_license_type(&self) -> Result<License>
Get license type used by this session
sourcepub fn render_cop_to_image(
&self,
cop_node: impl Into<NodeHandle>,
image_planes: impl AsRef<str>,
path: impl AsRef<Path>
) -> Result<String>
pub fn render_cop_to_image(
&self,
cop_node: impl Into<NodeHandle>,
image_planes: impl AsRef<str>,
path: impl AsRef<Path>
) -> Result<String>
Render a COP node to an image file
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Session
impl Send for Session
impl Sync for Session
impl Unpin for Session
impl !UnwindSafe for Session
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more