[Bf-committers] NDOF still unusable

Mike Erwin significant.bit at gmail.com
Mon Oct 31 19:11:27 CET 2011


<tehrasha at gmail.com> wrote:

> The only device I can get buttons to work with it is my Space Navigator.
> While Blender does see button events with my serial devices, it only
> sends 'unknown button event' (or something like that) to the console.
>

Ah, serial devices. Right now blender uses USB vendor:product ID to know
which device is being used. It does this differently on each platform, but
once it has that info, it can then map numeric HID buttons to conceptual
device buttons like "fit" or "top view". The button mapping is very
different for each USB device, so there is no default mapping. To be safe,
they are picked up as "unknown button" like you see, and are not put on the
event stream.

Do you or anyone else know how to identify a serial device from outside the
driver? Last I checked libspnav had no "what's plugged in?" function. If
so, we can get auto-detect working. If not, we could let the mighty user
force it to use a specific device (from the console perhaps).

Were you planning to create some kind menu to assign functions to buttons?
> I can picture such an interface in my head, but have no idea how to code
> it.
>

Nathan already enabled this in the keymap editor, and it works well.
Modifier keys on fancier models are still a half-open issue due to the way
I coded those. All other buttons can be assigned to any simple function,
just like a keypress or mouse click.


Mike Erwin
musician, naturalist, pixel pusher, hacker extraordinaire


More information about the Bf-committers mailing list