Missed Frames on Animation

I am doing an amimation that starts on frame ID 0 and ends in Frame ID 800.
Firstly I assumed a number of 801 frames

then i realise that were some failures (frame and repeated frames)
1 is rigth, 0 is the repetition of last frame and, 2 it’s a jumped frame

And the penultimate frame appears

then I assumed a number of 800 frames

And all the failures of the last animation disappears and penultimate frame dont appears


How can I fix this?

My Python Animation Cue (ii is the frame ID)

def tick(self):                                             
  ii = int(self.GetAnimationTime()*int(0.8e+00/1.0000e-03/1))

@nicolas.vuaille may have some insight

1 Like

You are doing a truncation with the int() method. Your duplicates and missing values are just due to this truncation.

Then, note that self.GetAnimationTime() return you a nomalized progress.

If you want to get the frame ID, you should use something like:

from paraview.simple import *

def tick(self):
    print(self.GetAnimationTime() * (GetAnimationScene().NumberOfFrames - 1))
1 Like

Sends an error: ‘GetAnimationScene’ is not defined

you should add the from paraview.simple import * before the method declaration

1 Like

Thank you