Expand description
Reading and setting node parameters, setting expressions and keyframes.
Different parameter types are modeled with a Parameter enum, to get to a concrete type, use pattern matching:
use hapi_rs::session::new_in_process;
use hapi_rs::parameter::*;
let session = new_in_process(None).unwrap();
let lib = session.load_asset_file("otls/hapi_parms.hda").unwrap();
let node = lib.try_create_first().unwrap();
if let Parameter::String(p) = node.parameter("single_string").unwrap() {
assert_eq!(p.get(0).unwrap(), "hello");
assert!(p.set(0, "world").is_ok());
}
Extra parameter features are available in ParmBaseTrait
Structs
Represents float parameters, including
Color
type.Represents integer parameters, including
Button
typeFor parameter animation
An internal handle to a parameter
Represents string parameters of many different types.
Enums
Traits
Common trait for parameters