Closed hx2A closed 2 years ago
Nothing in py5_tools.hooks.frame_hooks.py should block when called from a py5 user method (draw()
, setup()
, etc.) The get_screenshot()
function always blocks and blocking is optional for the others. The others should work fine if block=False
.
The solution was to check the callstack and make sure bridge.py is not in the stack.
get_screenshot()
adds a hook that gets called after the next iteration ofdraw()
. It won't get the screenshot before then. Theget_screenshot()
method will wait for its screenshot, but somehow this prevents the animation thread from running. The Sketch gets caught in a Catch 22.If this can't be fixed it should at least detect it and throw an error, alerting the user that the function is being used incorrectly.