Hi All,
Is there a way to “jump” to a specific time step when creating an animation with a python script? I am only aware of:
GoToFirst, GoToLast, GoToNext, GoToPrevious
Any advice would be much appreciated.
Thanks very much,
Louis
Hi All,
Is there a way to “jump” to a specific time step when creating an animation with a python script? I am only aware of:
GoToFirst, GoToLast, GoToNext, GoToPrevious
Any advice would be much appreciated.
Thanks very much,
Louis
With your reader being the active source, and n being the timestep you are looking for :
reader = GetActiveSource()
view = GetActiveView()
times = reader.TimestepValues
view.ViewTime = times[n]
Render()
Any objections to making a utility function for moving to a particular timestep by index @utkarsh.ayachit?
None, but let’s do it on the scene – same way as GoToFirst
etc. The script @mwestphal provided is slightly different since it behaves differently if there are multiple temporal sources in the scene.
Thanks Mathieu, that solved my problem.
Louis
Ah indeed, multiple temporal sources complicate things a bit.