When I run bpy.ops.screen.animation_play() directly from the script ("Run script" button), it plays the timeline and works fine. But if I try to run it from Animation Nodes, it gives me an error:
"Operator bpy.ops.screen.animation_play.poll() failed. Context is incorrect."
All I have in AN is a script node with an "integer" input (for "1" or "0" -> play or stop), then I connect an integer node to the subprogram of the script.
Here's my simple test script
# animStatus = 1 # only used when testing script alone
if animStatus == 1:
bpy.ops.screen.animation_play()
elif animStatus == 0:
bpy.ops.screen.animation_cancel(restore_frame=False)