[Bf-python] Draw.RegisterEvent proposal

Willian Padovani Germano wgermano at ig.com.br
Wed Aug 4 08:46:32 CEST 2004


Hi,

----- Original Message -----
From: "joeedh" <joeeagar at prodigy.net>
To: <bf-python at blender.org>
Sent: Wednesday, August 04, 2004 1:10 AM
Subject: Re: [Bf-python] Draw.RegisterEvent proposal


> 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.

So it's like scriptlinks, you define when it will be called by placing
somewhere a call to it.  For events happening outside the scripts win you
have to check for available callbacks based on events like selection or
whatever, independent of the scripts win, then (the callback pointers could
be in the scripts struct, where the draw, button and event ones are).

First of all the actual events to be added should be defined / discussed.
If they fit better for scriptlinks or script struct callbacks will depend on
that, of course.

BTW, I'm planning to add a var to control scriptlink execution.  This way
users could control that for moments they don't want scriptlinks being
triggered.  Much better than having to remove by hand all of them, then
re-add.

--
Willian, wgermano at ig.com.br




More information about the Bf-python mailing list