ovito.anim

class ovito.anim.AnimationSettings

Stores animation-related settings of the current DataSet. You can access an instance of this class through the dataset’s anim attribute.

Animation settings comprise the animation length (number of frames) and the current animation time. For example, to step through each animation frame and perform some action:

from ovito import dataset

for frame in range(0, dataset.anim.last_frame + 1):
    dataset.anim.current_frame = frame    # Jump to the animation frame.
    perform_something()
current_frame

The current animation frame. This parameter controls the position of the time slider in OVITO’s main window and determines which animation frame is shown in the viewports. It also affects various other functions that operate on the current animation frame.

Default:0
first_frame

The index of the first animation frame.

Default:0
frames_per_second

Controls the playback speed of the animation. This parameter also determines the playback speed of movie files generated by OVITO.

Default:10
last_frame

The index of the last animation frame. You can set this property to change the animation length.

Default:0