Moving object in a loop with Viewport visualization


Is it possible to change transformation of the object in a for loop and display each iteration in the viewport?
I am creating a script which changes the camera position, rotation etc. And I want to make it look smooth.
I have only one idea how to figure it out by setting keyframes and play then, but is some more direct way to do it?


I figure it out
The solution was to use OpenMaya.MTimerMessage.addTimerCallback
That’s exactly what I need