[Bf-taskforce25] windowmanager issues
Ton Roosendaal
ton at blender.org
Thu Nov 20 13:33:45 CET 2008
Hi,
<snip>
> What I'm unsure about is who is calling these notifiers. Take timeline
> play for example, who advances the time, calls that notifier and gets
> the esc event to stop it? Is it the region where the play button is,
> some built-in window manager thing, ..?
<snip>
> Suppose I wanted to write a continuous exporter to a game engine in
> python. That could be based on a timer handler indeed, but how can a
> python script create this handler and receive the events? For an
> operator you can create an operator and then creating python functions
> for poll/exec/modal/cancel, and that is then what is called by the
> window manager. What does the windowmanager call to execute the timer
> handler, does that also have a TimerHandlerType or some other way to
> specify callback functions?
I understand the issue; should work a bit on this, but probably it's
going to be by introducing different handler types. As we already
mentioned:
- keymap handler (has operator)
- uiBlock handler (has ??)
- timer handler (has operator)
- notifier handler (adds notifier event)
> The way I see it is that you would need a datalistener() callback
> (can't
> think of a good name currently), that areas/regions could have. Similar
> to UI notifiers and listeners it would have multiple types of
> notifications, like blendfile_changed, datablock_changed, with some
> subtypes that are more specific like datablock_removed,
> datablock_added, ..
<snip>
> data_notify(DATABLOCK_CHANGED, DATABLOCK_REMOVED, (ID*)ma);
<snip>
Sounds cool! Fits well with purpose of notifiers.
-Ton-
------------------------------------------------------------------------
Ton Roosendaal Blender Foundation ton at blender.org www.blender.org
Blender Institute BV Entrepotdok 57A 1018AD Amsterdam The Netherlands
More information about the Bf-taskforce25
mailing list