ITimeline#
Fully qualified name: omni::timeline::ITimeline
-
class ITimeline#
Defines a Timeline controller factory.
For compatibility reasons it also defines a timeline controller. This use case is deprecated.
Public Functions
- virtual void play(
- double startTimeCode = 0,
- double endTimeCode = 0,
- bool looping = true,
Deprecated Plays animation with current timeCodePerSecond.
if not set session start and end timecode, will play from global start time to end time in stage.
- Parameters:
startTimeCode – start timeCode of session play, won’t change the global StartTime.
endTimeCode – start timeCode of session play, won’t change the global EndTime.
looping – true to enable session play looping, false to disable, won’t change the global Looping.
-
virtual void pause() = 0#
Deprecated.
Pauses animation.
-
virtual void stop() = 0#
Deprecated.
Stops animation.
-
virtual void rewindOneFrame() = 0#
Deprecated.
Rewinds the timeline by one frame.
-
virtual void forwardOneFrame() = 0#
Deprecated.
Forwards the timeline by one frame.
-
virtual bool isPlaying() const = 0#
Deprecated.
Checks if animation is playing.
- Returns:
true if animation is playing.
-
virtual bool isStopped() const = 0#
Deprecated.
Checks if animation is stopped, as opposed to paused.
- Returns:
true if animation is stopped.
-
virtual void setAutoUpdate(bool autoUpdate) = 0#
Deprecated.
Turns on/off auto update
- Parameters:
autoUpdate – autoUpdate true to enable auto update, false to disable.
-
virtual bool isAutoUpdating() const = 0#
Deprecated.
Checks if timeline auto updates the frame
- Returns:
true if timeline is auto updating
-
virtual void setPrerolling(bool autoUpdate) = 0#
Deprecated.
Turns on/off prerolling status
- Parameters:
autoUpdate – prerolling true to indicate timeline is in preroll state
-
virtual bool isPrerolling() const = 0#
Deprecated.
Checks if timeline is in prerolling mode
- Returns:
true if timeline is in preroll
-
virtual void setLooping(bool looping) = 0#
Deprecated.
Sets animation looping mode.
- Parameters:
looping – looping true to enable looping, false to disable.
-
virtual bool isLooping() const = 0#
Deprecated.
Checks if animation is looping.
- Returns:
true if animation is looping.
-
virtual void setCurrentTime(double timeInSeconds) = 0#
Deprecated.
Sets current time of animation in seconds.
- Parameters:
timeInSeconds – Current time of animation in seconds.
-
virtual double getCurrentTime() const = 0#
Deprecated.
Gets current time of animation in seconds.
- Returns:
Current time of animation in seconds.
-
virtual double getStartTime() const = 0#
Deprecated.
Gets the start time of animation in seconds.
- Returns:
Begin time of animation in seconds.
-
virtual void setStartTime(double startTime) = 0#
Deprecated.
Sets the start time of animation in seconds. This will write into current opened stage.
- Parameters:
startTime – Begin time of animation in seconds.
-
virtual double getEndTime() const = 0#
Deprecated.
Gets the end time of animation in seconds.
- Returns:
End time of animation in seconds.
-
virtual void setEndTime(double endTime) = 0#
Deprecated.
Sets the end time of animation in seconds. This will write into current opened stage.
- Parameters:
endTime – End time of animation in seconds.
-
virtual double getTimeCodesPerSecond() const = 0#
Deprecated.
Gets timeCodePerSecond metadata from currently opened stage. This is equivalent to calling GetTimeCodesPerSecond on UsdStage.
- Returns:
timeCodePerSecond for current UsdStage.
-
virtual void setTimeCodesPerSecond(double timeCodesPerSecond) = 0#
Deprecated.
Sets timeCodePerSecond metadata to currently opened stage. This is equivalent to calling SetTimeCodesPerSecond on UsdStage.
- Parameters:
timeCodesPerSecond – TimeCodePerSecond to set into current stage.
-
virtual carb::events::IEventStream *getTimelineEventStream() = 0#
Deprecated.
Gets TimelineEventStream, emitting TimelineEventType.
- Returns:
IEventStream* of TimelineEventStream.
-
virtual void setTentativeTime(double timeInSeconds) = 0#
Deprecated.
Sets a tentative time of animation in seconds.
- Parameters:
timeInSeconds – A tentative current time of animation in seconds.
-
virtual void clearTentativeTime() = 0#
Deprecated.
Clear the tentative time of animation so it becomes invalid.
-
virtual double getTentativeTime() const = 0#
Deprecated.
Gets the tentative time of animation in seconds.
- Returns:
The tentative time if it is valid, current time if invalid.
-
virtual void setTicksPerFrame(unsigned int ticksPerFrame) = 0#
Deprecated.
Sets the tick count per frame, i.e. how many times update event is ticked per frame.
- Parameters:
ticksPerFrame – The tick per frame count.
-
virtual unsigned int getTicksPerFrame() const = 0#
Deprecated.
Gets the tick count per frame, i.e. how many times update event is ticked per frame.
- Returns:
The tick per frame count.
-
virtual double getTicksPerSecond() const = 0#
Deprecated.
Gets the tick count per seconds, i.e. how many times update event is ticked per second.
- Returns:
The tick per second count.
-
virtual unsigned int getCurrentTick() const = 0#
Deprecated.
Gets the current tick index, starting from zero. Always returns zero when ticks per frame is one.
- Returns:
The current tick index.
-
virtual void setFastMode(bool fastMode) = 0#
Deprecated.
Turns fast mode on or off.
- Parameters:
fastMode – true to turn on fast mode, false to turn it off.
-
virtual bool getFastMode() const = 0#
Deprecated.
Checks if fast mode is on or off.
- Returns:
true is fast mode is on.
-
virtual void setTargetFramerate(float targetFrameRate) = 0#
Deprecated.
Sets the target frame rate, which affects the derived FPS of the runloop in play mode. Exact runloop FPS is usually not the same as this value, as it is always a multiple of getTimeCodesPerSecond.
- Parameters:
targetFrameRate – The target frame rate.
-
virtual float getTargetFramerate() const = 0#
Deprecated.
Gets the target frame rate, which affects the derived FPS of the runloop in play mode. Exact runloop FPS is usually not the same as this value, as it is always a multiple of getTimeCodesPerSecond.
- Returns:
The target frame rate.
-
virtual TimelinePtr getTimeline(const char *name = nullptr) = 0#
Gets timeline with the given name.
Creates a new one if it does not exist.
- Parameters:
name – Name of the timeline.
- Returns:
The timeline
-
virtual bool destroyTimeline(const char *name) = 0#
Destroys the timeline with the given name if nothing references it.
Does not release the default timeline.
- Parameters:
name – Name of the timeline.
- Returns:
True if a timeline was deleted, false otherwise. The latter happens when the timeline does not exist, it is in use, or it is the default timeline.