[Bf-python] Howto get event value in a event spacehandler (not only event type from Blender.event) ?

steven admin at byteshelter.org
Tue Apr 15 15:24:11 CEST 2008


That's what i wanted to avoid for spacehandlers because this is
reaalllyyy slowing down my gui. I found a solution with a very small
c patch to pass the spacehandler event handler also the events value,
so it's realy fast now =).

I currently update my svn version to create a patch for current svn.


best regards,
Steven Truppe



Am Montag, den 14.04.2008, 12:56 +0200 schrieb Pablo Martin:
> For mouse x and y you can get it using blender python api itself
> (Blender.Window.GetMouseCoords()), you can also get the mouse buttons
> state in that way (Window.GetMouseButtons()), but you probably dont get
> the up event anyways, so unless you actively query yourself after the
> button has been pressed you cant do this (not a bad workaround for now
> though, but expensive processing wise).
> 
> Key value for events you cannot get, so you cant discriminate up/down
> (well.. you dont get the up event). Also many keys wont get correctly to
> the 3d view (like space bar, arrow keys...), cos blender itself
> processes them before.
> 
> Greetings and good luck :). Really looking forward to see and test your
> gui system.
> 
>  Pablo
> 
> steven escribió:
> > Hello again,
> >         
> >         i have a problem here with making the python bgl gui work with
> >         spacehandlers, because i can't find a way to get the event
> >         value.
> >         
> >         Blender.event
> >         
> >         is used for the event, but i can't find something telling me the
> >         event value. Like for Draw.MOUSEX or Draw.LEFTMOUSE i can't get
> >         the values.
> >         
> >         To get the mouse and keyboard state for each viewport buttons
> >         are
> >         in the space event handler needs the value, otherwise i can't
> >         further
> >         process the event (so no movement of GUI elements in a 3dview
> >         possible
> >         for now :[ :[).
> >         
> >         I hope someone can help me here, i think this is the last
> >         problem so i
> >         can release first examples.
> >         
> >         
> >         Thanks in advance!
> >         Steven Truppe
> >
> > _______________________________________________
> > Bf-python mailing list
> > Bf-python at blender.org
> > http://lists.blender.org/mailman/listinfo/bf-python
> >
> >   
> 
> _______________________________________________
> Bf-python mailing list
> Bf-python at blender.org
> http://lists.blender.org/mailman/listinfo/bf-python
> 




More information about the Bf-python mailing list