[Bf-python] threading needed for pyverse

Willian Padovani Germano wgermano at ig.com.br
Mon Nov 24 20:08:48 CET 2003


Hi Joe,

>   As for the python threading, the problem here is that everytime
> blender executes a script it clears it's global namespace and sets up
for
> a new script.

This is not a problem, it is necessary, you know.  Specially with better
integration, scripts, scriptlinks and gameengine scripts, and possibly
many scripts running in a single session, more than one script at a
time.

The Blender.Registry module is there to solve persistence issues, it'll
keep data in a dictionary that won't be discarded after each script run.

> There is a reason that the draw module draws in the text window(i
> believe) - because you probably don't want to run any more scripts
>until the global namespace has be cleared out and blender is set up
> to run a new script.

You can run more than one script at once, one per text window, each with
its own global dict (or the same if the user decided to keep the global
dict -- there's a function for this in the main Blender module).  The
current system was just hardcoded to use SpaceTexts.  With the new
SpaceScript this changes.

--
Willian, wgermano at ig.com.br





More information about the Bf-python mailing list