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
action_name: &'a str
The name of the action (animation) whose keyframes that you want to interpolate
start_time: f32
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
should_loop: bool
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]
impl<'a> ActionSettings<'a>
pub fn new(
action_name: &str,
start_time: f32,
should_loop: bool
) -> ActionSettings
[src]
pub fn new(
action_name: &str,
start_time: f32,
should_loop: bool
) -> ActionSettings
Creates new action settings for a specified action name
Auto Trait Implementations
impl<'a> Send for ActionSettings<'a>
impl<'a> Send for ActionSettings<'a>
impl<'a> Sync for ActionSettings<'a>
impl<'a> Sync for ActionSettings<'a>