Blender python screenshot wait I am new to python and blender.. But an old c/c++ dev years ago with working knowledge of c#.
So concepts are OK.. But knowledge poor lol.
I have a script that creates some text then rakes a screenshot and stores in file.
All works but the screen shot doesn't have the object in it.. Lol..
If I run again without deleting the first it's in there (obviously I now have 2 objects)
Do I am guessing the blender did api accepts the request and returns immediately without finishing? Or at least finishing and not updating the viewport until the script ends!?
Tried time sleep but that's prob on same thread so doesn't work..
Any ideas how to wait?
Thanks
OK so in my case putting
bpy.ops.wm.redraw( type=&quot;DRAW_WUN_SWAP&quot;, iterations=1) worked... Before I took the screen shot in code.
Got the info from here Update viewport while running script