omni.timeline

class omni.timeline.ITimeline

Bases: pybind11_builtins.pybind11_object

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_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)None

Plays animation.

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_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(self: omni.timeline._timeline.TimelineEventType, arg0: int)None

Bases: pybind11_builtins.pybind11_object

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

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
START_TIME_CHANGED = TimelineEventType.START_TIME_CHANGED
STOP = TimelineEventType.STOP
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::ITimeline
omni.timeline.get_timeline_interface() → omni.timeline._timeline.ITimeline

Returns cached omni.timeline.ITimeline interface

omni.timeline.release_timeline_interface(arg0: omni::timeline::ITimeline)None