[Bf-taskforce25] Multiple input devices

Ton Roosendaal ton at blender.org
Tue Nov 25 18:59:22 CET 2008


Hi,

For those who want to connect 2 mice, or a mouse + Ndof device, and 
other combos:

After a review with Brecht here, we ended with this idea for a simple 
approach (there are others too, needs experimenting!).

1) One device will stick to defining context. Typically the mouse/pen 
on the dominant hand. The other device (even when it has a pointer) is 
secondary, and doesn't activate subwindows in Blender for input.

2) For the non-dominant device, you will have to define a designated 
keymap and handlers. The non-dominant device gets own event defines, a 
mousebutton click should not get confused or mapped even, either it's a 
dominant mouse click, or a secondary one. For an NDof device it's 
easier of course.

3) Such keymap-handlers can be added to the regular handlers inside 
Blender's eventmanager. (on window, screen, area, region level). These 
handlers get a clear tag that they're secondary (tertiary etc) device.

4) The main handler loop then gets another loop outside, going over all 
devices. Only handlers for those devices get checked. This will enable 
nice combinations, where one device can be in 'blocking modal mode' 
(like while LMB painting), and the other device rotate a viewport on 
another handler level, without getting blocked.

5) Of course such a feature puts higher demands on design of 
modal-operators. While grabbing or painting, the initialize calls 
shouldn't assume the view to remain constant, or to store stroke-sizes 
based on mousemoves (store intersection points?). But imagine how fun 
it is to paint while holding a mouse still and rotate view! :)

In theory you can even make both devices invoke transforms (tweak 
gesture or so). Transform should be able to handle this nicely.

-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