[Bf-python] Draw.RegisterEvent proposal

joeedh joeeagar at prodigy.net
Thu Aug 5 01:18:20 CEST 2004


Willian Padovani Germano wrote:

>>My concern is that GUI scripts run *all* the time (until Draw.Exit is
>>called, I believe) thus making scriptlinks seemingly worthless.
>>    
>>
>
>It's like this: there are 3 callbacks that can be registered, one for
>drawing, one for gui button events and one for keyboard / mouse events.
>They don't run all the time.  When Blender needs to redraw the scripts win,
>the draw callback is called.  When there are button or input events for the
>scripts win, the respective callbacks (if any) are called.
>
>  
>
Ok, that makes sense.  BUT, I'm assuming that their namespace (all their 
variables) is kept intact. 

The thing that strikes me with the Draw module is that it makes scripts 
self-contained.  The problem I'm having with scriptlinks is figuring out 
which one is calling the script.   An event "loop" can solve this, but 
isn't the best soluition (I nearly killed my blend file a few times 
getting that to work) because it's difficult and cumbersome to actually 
implement.

Now, if scriptlinks could call specific functions. . .then there would 
be no use for a Draw.RegisterEvent function.

joeedh






More information about the Bf-python mailing list