I want to add marker on a video clip ( Shift+F2 from homescreen and then select the video file).
This is my code:
import bpy
result = [(.4, .4), (.5, .5)]
for (x, y) in result:
bpy.ops.clip.add_marker(location=(0.0, 0.0))
The error I am getting:
Python: Traceback (most recent call last):
File "/Text", line 6, in <module>
File "/snap/blender/5234/4.2/scripts/modules/bpy/ops.py", line 109, in __call__
ret = _op_call(self.idname_py(), kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Operator bpy.ops.clip.add_marker.poll() failed, context is incorrect
I need help to select the right context, that is the video file. Any help/ direction/ documentation would be appreciated.