[Bf-committers] NDOF patch and plugin for Linux

Ettore Pasquini ettore_pasquini at 3dconnexion.com
Mon Jul 9 22:41:10 CEST 2007


Hello everyone,

Here is finally the plugin and the patch to enable support to 3Dconnexion
devices on Linux. I've put them on my website for now, feel free to copy and
transfer everywhere you like.

http://cubelogic.org/blender/3dcnxplug-lin.c
http://cubelogic.org/blender/ghost-ndof-linux.patch

Functionality here is exactly the same as we already have on the Mac and
Windows, no more no less.

A few notes:
- copy the plugin into <BL_ROOT>/intern/ghost/intern/3dcnx/linux
- build as indicated inside the plugin source code
- you will still have to specify the path to the plugin inside the
ghostwinlay.c::window_open_ndof() function and rebuild blender with that.
I'll work on some way to generalize this.
- the driver must be running before you start blender
- the main difference on linux vs other platforms is that the 3Dconnexion
driver posts XEvent's already, so blender can process these events cleanly
with no proprietary code or constants. There is no need for the extra event
repackaging. 
- as you'll see in the patch, the ndofOpen() function passes in a more
complex NDOFPlatformInfo struct compared to the simple array on win/mac.
That's because the plugin needs to know more platform specific information
to initialize itself properly. All the dirty details are hidden inside
GHOST_SystemX11.cpp, the ndof_manager blindly passes what the platform
specific system prepares. In general this adds more flexibility. We could
extend this to win and mac eventually if it becomes a need.
- I removed one instance of the GPL license block from GHOST_SystemX11.cpp
because it was identically repeated twice. The GPL block IS still there in
case you wonder.

I compiled and tested all this on Debian Etch, which is not one of the
officially supported distros by 3Dconnexion. It should work on any other
distro I believe.

Feel free to report any issues and comments.

Ettore



More information about the Bf-committers mailing list