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§
- Float
Parameter - Represents float parameters, including
Color
type. - IntParameter
- Represents integer parameters, including
Button
type - KeyFrame
- For parameter animation
- Parm
Handle - An internal handle to a parameter
- Parm
Info - Documentation
- String
Parameter - Represents string parameters of many different types.
Enums§
Traits§
- Parm
Base Trait - Common trait for parameters