Struct blender_armature::ActionSettings[][src]

pub struct ActionSettings<'a> {
    pub action_name: &'a str,
    pub start_time: f32,
    pub should_loop: bool,
}

Settings for your armature's current action and (optionally) it's previous action.

Fields

The name of the action (animation) whose keyframes that you want to interpolate

The time that this action started. By comparing start_time to the current_time of your InterpolationSettings we determine how much time has elapsed in the action and use that to know which keyframes to sample. Note that when sampling your animation we start from the keyframe time of the first keyfame, not from time 0.0. So if you have keyframes 1.0, 3.0, and 6.0 seconds and your elapsed time is 1.5 seconds we sample at time 2.5s, not time 1.5

Whether or not the action should loop if current_time - start_time is greater than the duration of the action.

If you have a 5 second long action with should_loop: true then the 7th second would sample from the 2nd second of the action.

If should_loop: false then 7 seconds in will sample from the 5th second.

true is for repeating actions such as walk cycles, false might be used for a one off punch animation that shouldn't repeat.

Methods

impl<'a> ActionSettings<'a>
[src]

Creates new action settings for a specified action name

Auto Trait Implementations

impl<'a> Send for ActionSettings<'a>

impl<'a> Sync for ActionSettings<'a>