pub enum Parameter {
    Float(FloatParameter),
    Int(IntParameter),
    String(StringParameter),
    Button(IntParameter),
    Other(BaseParameter),
}
Expand description

Enum of different parameter types.

Variants§

§

Float(FloatParameter)

ParmType::Float | ParmType::Color

§

Int(IntParameter)

ParmType::Int | ParmType::Toggle

§

String(StringParameter)

ParmType::String | ParmType::Node | ParmType::PathFile | ParmType::PathFileDir | ParmType::PathFileGeo | ParmType::PathFileImage

§

Button(IntParameter)

ParmType::Int

§

Other(BaseParameter)

Other ParmType::_

Implementations§

source§

impl Parameter

source

pub fn value_as_debug(&self) -> Result<Box<dyn Debug>>

A convenient method to evaluate a parameter value as string for debugging.

source

pub fn info(&self) -> &ParmInfo

Information about the parameter

source

pub fn name(&self) -> Result<String>

Parameter internal name

source

pub fn label(&self) -> Result<String>

Parameter UI label

source

pub fn size(&self) -> i32

Number or elements in the parameter

source

pub fn parent(&self) -> Result<Option<ParmInfo>>

Parameter parent if any (examples are multi-parm or Folder type parameters)

Trait Implementations§

source§

impl Debug for Parameter

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl ParmBaseTrait for Parameter

source§

fn name(&self) -> Result<Cow<'_, str>>

source§

fn session(&self) -> &Session

source§

fn node(&self) -> NodeHandle

source§

fn size(&self) -> i32

source§

fn info(&self) -> &ParmInfo

source§

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.
source§

fn is_menu(&self) -> bool

If the parameter has choice menu.
source§

fn menu_items(&self) -> Result<Option<Vec<ParmChoiceInfo>>>

If parameter is a menu type, return a vec of menu items
source§

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

fn expression(&self, index: i32) -> Result<Option<String>>

Returns a parameter expression string
source§

fn has_expression(&self, index: i32) -> Result<bool>

Checks if parameter has an expression
source§

fn set_expression(&self, value: &str, index: i32) -> Result<()>

Set parameter expression
source§

fn remove_expression(&self, index: i32) -> Result<()>

Remove parameter expression
source§

fn revert_to_default(&self, index: i32) -> Result<()>

Revert parameter at index to its default value
source§

fn set_anim_curve(&self, index: i32, keys: &[KeyFrame]) -> Result<()>

Set keyframes on the parameter

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.