[Bf-python] framechange, keypress, selection change callbacks

Willian Padovani Germano wgermano at ig.com.br
Thu Jan 15 06:45:20 CET 2004


Hi dunk,

----- Original Message -----
From: <dunk at dunkfordyce.co.uk>
To: <bf-python at blender.org>
Sent: Saturday, January 10, 2004 11:39 AM
Subject: Re: [Bf-python] framechange, keypress, selection change
callbacks


> ok i have talked to kaito and i understand a few of the problems
already.
>
> he told me a little about scriptspace? can anyone fill me in or point
> me to the relevant place?

Hi, sorry -- as I wrote in another email, I couldn't answer before.

About ScriptSpace: To have scripts accessible from menus in Blender
(this is already working, at least for me, as of today, will explain
here soon), we needed to free the script execution code from using the
TextSpace.  That's what ScriptSpace is for: to show script guis, get
events for them, etc.  You can select it in Blender: the Scripts Window.

About your ideas for hooking events to pycode: we got requests for
things like this and I've considered some possibilities, still have to
talk to Ton first.  It is a useful addition to be able to talk to a
script w/o having to press a button at its gui, we just have to look for
a good way to do this.

What I'm considering: let scripts register a few keystrokes and put
Blender in a mode where, if such keys are pressed in the 3d view win,
the event is actually sent to the scriptspace, together with a redraw
for it, so the script can handle the event.  This is like a special
mode, that we have to clearly denote, possibly with a very visible (red,
blinking, whatever) icon at the 3d view win.  To get out of this mode,
the user could press Esc or click on the icon itself.

Again, this is only a thought, didn't try it yet and didn't talk to Ton
about it yet.  There are other alternatives.  We have to consider things
like: what happens when the script goes away, etc.

Sorry, I still didn't have time to check your first patch.  I want to
check what happens when the script ends and if that function (for
framechanged) couldn't support all other event types too.

BTW: a new event type is also in the plans, let's see if it works well
(you can code it if you want to): 'TIMEOUT'.  Like: set a timer that
calls a scriptlink on defined time intervals.

--
Willian, wgermano at ig.com.br




More information about the Bf-python mailing list