Do scripts always lock up blender

I’m writing a particularly processing intensive export script and I’ve noticed that when the script is running, blender is oblivious to input.

Also, calling Draw.Redraw() doesn’t actually redraw until the script finishes (probably because the script is running in blenders event thread or something).

I was just wondering if there was a way of writing scripts so they don’t lock up blender? I guess I could use multithreading but there must be a nicer way…

You could try processing the event queue in the middle of your main loop. However if Redraw waits for the script to finish, so might the event handling.

Hmm… yeah that didn’t work. Calling my gui() callback directly didn’t work either. But I think if blender users are used to lockups during things like rendering and AO baking etc then they can deal with a script that behaves the same way. Continuity is, after all, a Good Thing. And they can read the console if they want status updates.

Thanks though.