Skip to main content

ss_player_set_animation_section

Function ss_player_set_animation_section 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn ss_player_set_animation_section( handle: *mut SsPlayer, start: i32, end: i32, ) -> i32
Expand description

Restrict playback to start..=end of the current animation, so looping and ping-pong turn around inside that range. Both ends are included; an end outside the animation (-1, say) stands for the animation’s edge on that side. An end before the start, both inside the animation, is refused with the runtime’s invalid-parameter code, and the section and the playhead stay as they were.

Call it after ss_player_set_animation: frame numbers only mean something inside the animation they were measured in, and setting an animation rebuilds the tree and takes the section with it.

§Safety

handle must be a live handle or null.