pub struct StringParameter(/* private fields */);
Expand description
Represents string parameters of many different types.
Implementations§
Source§impl StringParameter
impl StringParameter
Sourcepub fn set(&self, index: i32, value: impl AsRef<str>) -> Result<()>
pub fn set(&self, index: i32, value: impl AsRef<str>) -> Result<()>
Set parameter value at index.
Sourcepub fn set_array<T: AsRef<str>>(&self, val: impl AsRef<[T]>) -> Result<()>
pub fn set_array<T: AsRef<str>>(&self, val: impl AsRef<[T]>) -> Result<()>
Set all parameter tuple values
Sourcepub fn save_parm_file(
&self,
destination_dir: &Path,
filename: &str,
) -> Result<()>
pub fn save_parm_file( &self, destination_dir: &Path, filename: &str, ) -> Result<()>
Save/Download a file referenced in this parameter to a given file.
filename
must include the desired extension to work properly.
Sourcepub fn set_value_as_node(&self, value: impl AsRef<NodeHandle>) -> Result<()>
pub fn set_value_as_node(&self, value: impl AsRef<NodeHandle>) -> Result<()>
If parameter is a ParmType::Node
type, set it to reference another node
Sourcepub fn get_value_as_node(&self) -> Result<Option<NodeHandle>>
pub fn get_value_as_node(&self) -> Result<Option<NodeHandle>>
Return a handle to a node if the parameter is of type ParmType::Node
Trait Implementations§
Source§impl Debug for StringParameter
impl Debug for StringParameter
Source§impl ParmBaseTrait for StringParameter
impl ParmBaseTrait for StringParameter
fn name(&self) -> Result<Cow<'_, str>>
fn session(&self) -> &Session
fn node(&self) -> NodeHandle
fn size(&self) -> i32
fn info(&self) -> &ParmInfo
Source§fn update(&mut self) -> Result<()>
fn update(&mut self) -> Result<()>
Update the internal parameter metadata if Houdini parameter changed,
for example children added to a multi-parm or the menu was updated.
If the parameter has choice menu.
If parameter is a menu type, return a vec of menu items
Source§fn multiparm_children(&self) -> Result<Option<Vec<Parameter>>>
fn multiparm_children(&self) -> Result<Option<Vec<Parameter>>>
If the parameter is a multiparm, return its children parms.
NOTE: THis is not a recommended way to traverse parameters in general,
this is here for convenience only
fn insert_multiparm_instance(&self, position: i32) -> Result<()>
fn remove_multiparm_instance(&self, position: i32) -> Result<()>
Source§fn expression(&self, index: i32) -> Result<Option<String>>
fn expression(&self, index: i32) -> Result<Option<String>>
Returns a parameter expression string
Source§fn revert_to_default(&self, index: Option<i32>) -> Result<()>
fn revert_to_default(&self, index: Option<i32>) -> Result<()>
Revert parameter at index to its default value. If
index
is None - reset all instances.Source§fn set_anim_curve(&self, index: i32, keys: &[KeyFrame]) -> Result<()>
fn set_anim_curve(&self, index: i32, keys: &[KeyFrame]) -> Result<()>
Set keyframes on the parameter
fn has_tag(&self, tag: &str) -> Result<bool>
Source§fn get_tag_name(&self, tag_index: i32) -> Result<String>
fn get_tag_name(&self, tag_index: i32) -> Result<String>
Get parameter tag name by index. The number of tags is stored in
self.info().tag_count()
fn get_tag_value(&self, tag_name: &str) -> Result<String>
Auto Trait Implementations§
impl Freeze for StringParameter
impl !RefUnwindSafe for StringParameter
impl Send for StringParameter
impl Sync for StringParameter
impl Unpin for StringParameter
impl !UnwindSafe for StringParameter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more