[Bf-python] This code on linux does't work

salvetti.gianmario at tiscali.it salvetti.gianmario at tiscali.it
Sat Sep 11 16:14:50 CEST 2004


from Blender import Draw, Window

done = 0
while not done:  # enter a 'get event' loop
    evt, val = Window.QRead() # catch next event
    if evt in [Draw.ESCKEY, Draw.QKEY]:
        done = 1 # end loop
    elif evt == Draw.SPACEKEY:
        Draw.PupMenu("Hey!|What did you expect?")
     elif evt == Draw.REDRAW: # catch redraw events to handle them
        Window.RedrawAll() # redraw all areas
        print "ridisegno intercettato"
    elif evt == Draw.LEFTMOUSE and val: # left button pressed
        v3d = Window.GetScreenInfo(Window.Types.VIEW3D)
        id = v3d[0]['id'] # get the (first) VIEW3D's id    
        Window.QAdd(id, evt, 1, 0) # add the caught mouse event to it
        Window.QHandle(id) # process the event
        Window.Redraw() # show the change in the VIEW3D areas.



When i click the left mouse button, nothing happens. When the
script quits, the cursor 3d moves into last position
assumed by the mouse pointer, shifted of one equal amount
to the width of the script window.

Sorry for my poor english.


Linux Slackware 10.0
Python 2.3.4
blender 2.34 (binary)
blender (cvs)


Gianmario Salvetti.

__________________________________________________________________
Tiscali ADSL Senza Canone, paga solo quello che consumi!
Non perdere la promozione valida fino al 30 settembre. Per te gratis il
modem
in comodato e l'attivazione. In piu' navighi a soli 1,5 euro l'ora per i
primi tre mesi. Cosa aspetti? Attivala subito!
http://abbonati.tiscali.it/adsl/prodotti/640Kbps/






More information about the Bf-python mailing list