Translate source object based on time

I would like to translate a disk (added from the GUI Sources > Disk) as a function of the time. I found Move Source (disk or sphere) according to time dependent function which does this for a Sphere, but the same method does not seem to apply here since Center is not a property of the Disk object.

I would imagine it is possible do this from Python similar to the linked question, but using some other function and not setting the property directly. Here is some incomplete pseudo-code for what I want to achieve:

from paraview.simple import *

def start_cue(self): pass

def tick(self):
  tk = GetTimeKeeper()
  t = tk.Time
  center = [t, 0, 0]
  s = FindSource('Disk1')
  
  # TODO: Apply translation such that the disk is centered at `center`

def end_cue(self): pass

You can add a Transform Filter on your disk and then set the Translate property of the transform.

Thanks, I’ll try that. Do you know where I can find an example of how to use such a filter from Python? I didn’t find any in the documentation, but perhaps I was looking in the wrong places.

You can find an overview here: https://docs.paraview.org/en/latest/UsersGuide/filteringData.html?highlight=transform#transform

Otherwise, to create python script I recommend to use the Python trace (https://docs.paraview.org/en/latest/UsersGuide/introduction.html?highlight=python%20trace#tracing-actions-for-scripting). It records in python what you do in the GUI.