omni.timeline¶
-
class
omni.timeline.
ITimeline
¶ -
clear_tentative_time
(self: omni.timeline._timeline.ITimeline) → None¶ Clear tentative time of animation in seconds.
Clear/Invalidate the tentative time
-
forward_one_frame
(self: omni.timeline._timeline.ITimeline) → None¶ Forwards the timeline by one frame.
-
get_current_time
(self: omni.timeline._timeline.ITimeline) → float¶ Gets current time of animation in seconds.
- Returns
Current time of animation in seconds.
-
get_end_time
(self: omni.timeline._timeline.ITimeline) → float¶ Gets the end time of animation in seconds.
- Returns
End time of animation in seconds.
-
get_start_time
(self: omni.timeline._timeline.ITimeline) → float¶ Gets the start time of animation in seconds.
- Returns
Start time of animation in seconds.
-
get_tentative_time
(self: omni.timeline._timeline.ITimeline) → float¶ Gets tentative time of animation in seconds.
- Returns
Tentative time of animation if it is valid, otherwise return current time
-
get_time_codes_per_seconds
(self: omni.timeline._timeline.ITimeline) → float¶ Gets timeCodePerSecond metadata from currently opened stage. This is equivalent to calling GetTimeCodesPerSecond on UsdStage.
- Returns
timeCodePerSecond for current UsdStage.
-
get_timeline_event_stream
(self: omni.timeline._timeline.ITimeline) → carb.events._events.IEventStream¶ Gets TimelineEventStream, emitting TimelineEventType.
- Returns
TimelineEventStream.
-
is_auto_updating
(self: omni.timeline._timeline.ITimeline) → bool¶ Checks if timeline is auto updating.
- Returns
True if timeline is auto updating. False otherwise.
-
is_looping
(self: omni.timeline._timeline.ITimeline) → bool¶ Checks if animation is looping.
- Returns
True if animation is looping. False otherwise.
-
is_playing
(self: omni.timeline._timeline.ITimeline) → bool¶ Checks if animation is playing.
- Returns
True if animation is playing. False otherwise.
-
is_prerolling
(self: omni.timeline._timeline.ITimeline) → bool¶ Checks if timeline is prerolling.
- Returns
True if timeline is prerolling. False otherwise.
-
is_stopped
(self: omni.timeline._timeline.ITimeline) → bool¶ Checks if animation is stopped, as opposed to paused.
- Returns
True if animation is stopped. False otherwise.
-
pause
(self: omni.timeline._timeline.ITimeline) → None¶ Pauses animation.
-
play
(self: omni.timeline._timeline.ITimeline, start_timecode: float = 0, end_timecode: float = 0, looping: bool = True) → None¶ Plays animation with current timeCodePerSecond. if not set session start and end timecode, will play from global start time to end time in stage. :param start_timecode: start timecode of session play, won’t change the global StartTime. :param end_timecode: start timecode of session play, won’t change the global EndTime. :param looping: true to enable session play looping, false to disable, won’t change the global Looping.
-
rewind_one_frame
(self: omni.timeline._timeline.ITimeline) → None¶ Rewinds the timeline by one frame.
-
set_auto_update
(self: omni.timeline._timeline.ITimeline, auto_update: bool) → None¶ Turns on/off auto update.
- Parameters
auto_update – True to enable auto update, False to disable.
-
set_current_time
(self: omni.timeline._timeline.ITimeline, time_in_seconds: float) → None¶ Sets current time of animation in seconds.
- Parameters
Current time of animation in seconds. (time_in_seconds) –
-
set_end_time
(self: omni.timeline._timeline.ITimeline, end_time: float) → None¶ Sets the end time of animation in seconds. This will write into current opened stage.
- Parameters
end_time – End time of animation in seconds.
-
set_looping
(self: omni.timeline._timeline.ITimeline, looping: bool) → None¶ Sets animation looping mode.
- Parameters
looping – True to enable looping, False to disable.
-
set_prerolling
(self: omni.timeline._timeline.ITimeline, preroll: bool) → None¶ Turns on/off preroll status.
- Parameters
preroll – True to enable preroll, False to disable.
-
set_start_time
(self: omni.timeline._timeline.ITimeline, start_time: float) → None¶ Sets the begin time of animation in seconds. This will write into current opened stage.
- Parameters
start_time – Begin time of animation in seconds.
-
set_tentative_time
(self: omni.timeline._timeline.ITimeline, time_in_seconds: float) → None¶ Sets tentative time of animation in seconds.
- Parameters
Tentative time of animation in seconds. (time_in_seconds) –
-
set_time_codes_per_second
(self: omni.timeline._timeline.ITimeline, time_codes_per_second: float) → None¶ Sets timeCodePerSecond metadata to currently opened stage. This is equivalent to calling SetTimeCodesPerSecond on UsdStage.
- Parameters
time_codes_per_second – TimeCodePerSecond to set into current stage.
-
stop
(self: omni.timeline._timeline.ITimeline) → None¶ Stops animation.
-
-
class
omni.timeline.
TimelineEventType
¶ Timeline event types to be used by TimelineEventStream.
Members:
PLAY
PAUSE
STOP
CURRENT_TIME_CHANGED
CURRENT_TIME_TICKED
LOOP_MODE_CHANGED
START_TIME_CHANGED
END_TIME_CHANGED
TIME_CODE_PER_SECOND_CHANGED
AUTO_UPDATE_CHANGED
PREROLLING_CHANGED
TENTATIVE_TIME_CHANGED
-
AUTO_UPDATE_CHANGED
= TimelineEventType.AUTO_UPDATE_CHANGED¶
-
CURRENT_TIME_CHANGED
= TimelineEventType.CURRENT_TIME_CHANGED¶
-
CURRENT_TIME_TICKED
= TimelineEventType.CURRENT_TIME_TICKED¶
-
END_TIME_CHANGED
= TimelineEventType.END_TIME_CHANGED¶
-
LOOP_MODE_CHANGED
= TimelineEventType.LOOP_MODE_CHANGED¶
-
PAUSE
= TimelineEventType.PAUSE¶
-
PLAY
= TimelineEventType.PLAY¶
-
PREROLLING_CHANGED
= TimelineEventType.PREROLLING_CHANGED¶
-
START_TIME_CHANGED
= TimelineEventType.START_TIME_CHANGED¶
-
STOP
= TimelineEventType.STOP¶
-
TENTATIVE_TIME_CHANGED
= TimelineEventType.TENTATIVE_TIME_CHANGED¶
-
TIME_CODE_PER_SECOND_CHANGED
= TimelineEventType.TIME_CODE_PER_SECOND_CHANGED¶
-
property
name
¶ handle) -> str
- Type
(self
-
-
omni.timeline.
acquire_timeline_interface
(plugin_name: str = None, library_path: str = None) → omni.timeline._timeline.ITimeline¶
-
omni.timeline.
get_timeline_interface
() → omni.timeline._timeline.ITimeline¶ Returns cached
omni.timeline.ITimeline
interface
-
omni.timeline.
release_timeline_interface
(arg0: omni.timeline._timeline.ITimeline) → None¶