I need to close the "View Animation" window using python. I found something like bpy.ops.render.view_cancel()
but when I try to execute it, I get this:
Traceback (most recent call last):
File "<blender_console>", line 1, in <module>
File "/Applications/Blender 6.app/Contents/Resources/4.1/scripts/modules/bpy/ops.py", line 109, in __call__
ret = _op_call(self.idname_py(), kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Operator bpy.ops.render.view_cancel.poll() failed, context is incorrect
Is there a way to fix this or any other method to close that window?