Using Lua to interact with Sequence nodes
Sequences are animations that can be controlled from scripts.
Playing or not
Current time in seconds the sequence is set to
Total length of the sequence in seconds - dynamically derived from all tracks
Play direction, __Sequence_PlayForwards (0), or __Sequence_PlayBackwards (1)
Number of times to play sequence, if less than 0, it loops forever
Scalar value to apply to the timestep value when playing - 1.0 normal speed, 0.5 half speed, 2.0 double speed, etc
The user triggering the sequence playback (when playing a sequence with a body track this dictates which user flies in a collaborative session)
This script prints the length and play speed of a sequence to the Log window and the sets the sequence to play forever and starts the sequence playing.
-- Drag/Drop section BEGINS - Do not edit between BEGINS and ENDS.
local Sequence = __Script.dragdrop.Sequence
-- Drag/Drop section ENDS
print("Length = ", Sequence.Length)
print("Speed = ", Sequence.PlaySpeed)
-- set the sequence to play forwards
Sequence.PlayMode = 0
-- set the sequence to play forever
Sequence.PlayCount = -1
-- set the sequence to play
Sequence.Enabled = 1
Work with Level of Detail and GeoGroup Nodes
Work with Audio Nodes