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

Pablo Martin caedes at sindominio.net
Mon Apr 14 12:56:33 CEST 2008


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




More information about the Bf-python mailing list