0
$\begingroup$

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

$\endgroup$

1 Answer 1

0
$\begingroup$

OK so in my case putting

bpy.ops.wm.redraw( type="DRAW_WUN_SWAP", iterations=1) worked... Before I took the screen shot in code.

Got the info from here Update viewport while running script

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .