Re: [Bf-committers] 3D Connexion ndof support in blender 2.5
Hi Mike, That's very good news I'm sending a patch for your branch that makes SpaceNav works in Linux using the opensource api. I had to modify the cmake files to include the libspnav but I don't know if i made it right. I also noticed that only rotations is available now and but the original code allowed translations too. att Rafael Ortis 2011/1/3 Mike Erwin : > Hi all, here's an update for the SpaceNav work I did over the summer. > Hopefully this will help with future development. > >> From the svn logs he made very good progress. He commented there >> that his ndof implementation is working in Windows and Mac but in my >> Linux it did not worked :( > > Yeah, sorry I never got around to Linux! It should be fairly easy to integrate > this summer's GHOST_NDOFManager code on that OS as well. Nuclear > (creator of open source driver) offered to help with this, and his API is much > cleaner than 3Dconnexion's ancient Magellan API. I highly recommend > using the open source driver and ignoring the legacy support. > >> And based on the part of the code I saw, I think that his work is >> going to be much more clean than my patch :D > > Thanks! The older NDOF system was a mess, so I started over with proper > handling of the device and its events. Operators, keymaps, all that. As a > bonus, users no longer need to find and install a plugin -- all support is > built > in to blender. > > Built-in support: There was one issue with 3Dconnexion not allowing svn > distribution of their Mac header files (even though these are part of the > freely > downloadable driver package) but that can be resolved later by using > the Mac's HID manager directly. Yet another reason to use the open > driver on Linux! Strangely enough, this is not an issue on Windows. > >> When his work is going to be merged to the trunk? Only at the end of >> the GSoC project? > > The project is officially over, after which I got sucked into grad school > full time. Over the holiday I've been working on blender's tablet code only. > There are tablet bug reports with my name on them, and I want them gone > ASAP! :) This requires simultaneous cross-platform changes, so it's in a > new branch (branches/merwin-tablet). Once the tablet is working great on > all platforms, I'll submit one big patch. > > SpaceNav is still on my radar, as enthusiastic users, coders, and > 3Dconnexion employees continue to "encourage" progress in this area. > >> From the GSoC project log I think he still has a lot of work to do :( > > Yes and no. The foundational stuff is all in place except the Linux > contribution to GHOST_NDOFManager. That should take a day or two > once you're familiar. Much more work is needed for operators and spaces > to actually use these events. I used the 3D view to test the new event > layers below -- motion events change the view turntable style, and one > of the buttons fits the selection into view. The bulk of future work will be > to expand tools and such to deal with NDOF events in interesting and > useful ways. So I don't have a lot of work to do, but *we* do! :) > > That's it for now! Glad someone else is interested in getting this stuff > working again. > > Mike Erwin > musician, naturalist, pixel pusher, hacker extraordinaire > ___ > Bf-committers mailing list > Bf-committers@blender.org > http://lists.blender.org/mailman/listinfo/bf-committers > Index: intern/ghost/intern/GHOST_SystemX11.h === --- intern/ghost/intern/GHOST_SystemX11.h (revisão 34074) +++ intern/ghost/intern/GHOST_SystemX11.h (cópia de trabalho) @@ -215,6 +215,12 @@ unsigned int *context) const; /** +* Create the atoms used by ndof events +* @param display Current display +*/ + void createNDOFAtoms(Display * display); + + /** * Returns unsinged char from CUT_BUFFER0 * @param selection Get selection, X11 only feature * @return Returns the Clipboard indicated by Flag @@ -276,6 +282,14 @@ Atom m_incr; Atom m_utf8_string; + /** +* Atoms for NDOF +*/ + Atom motion_event; + Atom button_press_event; + Atom button_release_event; + Atom command_event; + private : Display * m_display; Index: intern/ghost/intern/GHOST_NDOFManager.h === --- intern/ghost/intern/GHOST_NDOFManager.h (revisão 34074) +++ intern/ghost/intern/GHOST_NDOFManager.h (cópia de trabalho) @@ -45,7 +45,7 @@ // processes most recent raw data into an NDOFMotion event and sends it // returns whether an event was sent - bool sendMotionEvent(); + virtual bool sendMotionEvent(); protected: GHOST_System& m_system; Index: intern/ghost/intern/GHOST_NDOFManagerX11.h ===
Re: [Bf-committers] 3D Connexion ndof support in blender 2.5
Hi all, here's an update for the SpaceNav work I did over the summer. Hopefully this will help with future development. > From the svn logs he made very good progress. He commented there > that his ndof implementation is working in Windows and Mac but in my > Linux it did not worked :( Yeah, sorry I never got around to Linux! It should be fairly easy to integrate this summer's GHOST_NDOFManager code on that OS as well. Nuclear (creator of open source driver) offered to help with this, and his API is much cleaner than 3Dconnexion's ancient Magellan API. I highly recommend using the open source driver and ignoring the legacy support. > And based on the part of the code I saw, I think that his work is > going to be much more clean than my patch :D Thanks! The older NDOF system was a mess, so I started over with proper handling of the device and its events. Operators, keymaps, all that. As a bonus, users no longer need to find and install a plugin -- all support is built in to blender. Built-in support: There was one issue with 3Dconnexion not allowing svn distribution of their Mac header files (even though these are part of the freely downloadable driver package) but that can be resolved later by using the Mac's HID manager directly. Yet another reason to use the open driver on Linux! Strangely enough, this is not an issue on Windows. > When his work is going to be merged to the trunk? Only at the end of > the GSoC project? The project is officially over, after which I got sucked into grad school full time. Over the holiday I've been working on blender's tablet code only. There are tablet bug reports with my name on them, and I want them gone ASAP! :) This requires simultaneous cross-platform changes, so it's in a new branch (branches/merwin-tablet). Once the tablet is working great on all platforms, I'll submit one big patch. SpaceNav is still on my radar, as enthusiastic users, coders, and 3Dconnexion employees continue to "encourage" progress in this area. > From the GSoC project log I think he still has a lot of work to do :( Yes and no. The foundational stuff is all in place except the Linux contribution to GHOST_NDOFManager. That should take a day or two once you're familiar. Much more work is needed for operators and spaces to actually use these events. I used the 3D view to test the new event layers below -- motion events change the view turntable style, and one of the buttons fits the selection into view. The bulk of future work will be to expand tools and such to deal with NDOF events in interesting and useful ways. So I don't have a lot of work to do, but *we* do! :) That's it for now! Glad someone else is interested in getting this stuff working again. Mike Erwin musician, naturalist, pixel pusher, hacker extraordinaire ___ Bf-committers mailing list Bf-committers@blender.org http://lists.blender.org/mailman/listinfo/bf-committers
Re: [Bf-committers] 3D Connexion ndof support in blender 2.5
Thanks! >From the svn logs he made very good progress. He commented there that his ndof implementation is working in Windows and Mac but in my Linux it did not worked :( And based on the part of the code I saw, I think that his work is going to be much more clean than my patch :D When his work is going to be merged to the trunk? Only at the end of the GSoC project? >From the GSoC project log I think he still has a lot of work to do :( I'm sending my patch with the corrections proposed by Ton if someone find it's useful let me know! :D att. Rafael Ortis 2011/1/2 M.G. Kishalmi : > GSoC log of Mike Erwin (Matts student) > -> http://www.invisible-cow.com/blender/soc/index.html > > soc-2010-merwin branch > -> https://svn.blender.org/svnroot/bf-blender/branches/soc-2010-merwin/ > > cheers, > mario > > > On Sun, Jan 2, 2011 at 8:41 PM, Rafael Ortis wrote: >> I have read about it in some forum but I didn't find it on Blender GSoC >> pages. >> Where can i find Matts work? >> >> >> 2011/1/1 Tom M : >>> Didn't matts student work on 3dconnexxion as part of GSoC? >>> >>> Not sure what stage that part of his project achieved but it might be >>> worth looking at. >>> >>> LetterRip >>> >>> On Sat, Jan 1, 2011 at 8:26 AM, Rafael Ortis wrote: Yes this is interesting! I have installed this drivers but in my initial tests the rotations/translations was a little bit uncontrollable. But I will test with this driver them again. att Rafael Ortis 2011/1/1 Stephen Swaney : > Also worth noting is the open source SpaceNav project. > > They have a drop-in replacement for the 3dconnexion driver > that also supports a non-proprietary protocol. Looks > interesting. > > http://spacenav.sourceforge.net/ > > -- > Stephen Swaney > sswa...@centurytel.net > > ___ > Bf-committers mailing list > Bf-committers@blender.org > http://lists.blender.org/mailman/listinfo/bf-committers > ___ Bf-committers mailing list Bf-committers@blender.org http://lists.blender.org/mailman/listinfo/bf-committers >>> ___ >>> Bf-committers mailing list >>> Bf-committers@blender.org >>> http://lists.blender.org/mailman/listinfo/bf-committers >>> >> ___ >> Bf-committers mailing list >> Bf-committers@blender.org >> http://lists.blender.org/mailman/listinfo/bf-committers >> > ___ > Bf-committers mailing list > Bf-committers@blender.org > http://lists.blender.org/mailman/listinfo/bf-committers > Index: source/blender/makesdna/DNA_windowmanager_types.h === --- source/blender/makesdna/DNA_windowmanager_types.h (revisão 34012) +++ source/blender/makesdna/DNA_windowmanager_types.h (cópia de trabalho) @@ -44,6 +44,9 @@ struct wmKeyMap; struct wmKeyConfig; +/* XXX HACK */ +struct wmNdofState; + /* forwards */ struct bContext; struct wmLocal; @@ -173,6 +176,11 @@ short addmousemove; /* internal: tag this for extra mousemove event, makes cursors/buttons active on UI switching */ short pad2[2]; +/* XXX HACK */ +struct wmNdofState *ndofState; +//float ndof[7]; +//int pad3; + struct wmEvent *eventstate; /* storage for event system */ struct wmSubWindow *curswin;/* internal for wm_subwindow.c only */ @@ -298,6 +306,23 @@ } wmOperator; + +/* XXX HACK */ +/* Current values of ndof device - used in wmWindow*/ +typedef struct wmNdofState { +// translations +float tx; +float ty; +float tz; +// rotations +float rx; +float ry; +float rz; +// delta +float delta; +} wmNdofState; + + /* operator type exec(), invoke() modal(), return values */ #define OPERATOR_RUNNING_MODAL 1 #define OPERATOR_CANCELLED 2 Index: source/blender/windowmanager/intern/wm_files.c === --- source/blender/windowmanager/intern/wm_files.c (revisão 34012) +++ source/blender/windowmanager/intern/wm_files.c (cópia de trabalho) @@ -234,6 +234,10 @@ win->eventstate= oldwin->eventstate; oldwin->eventstate= NULL; + /* XXX HACK */ + win->ndofState= oldwin->ndofState; + oldwin->ndofState= NULL; + /* ensure proper screen rescaling */ win->sizex= oldwin->sizex;
Re: [Bf-committers] 3D Connexion ndof support in blender 2.5
GSoC log of Mike Erwin (Matts student) -> http://www.invisible-cow.com/blender/soc/index.html soc-2010-merwin branch -> https://svn.blender.org/svnroot/bf-blender/branches/soc-2010-merwin/ cheers, mario On Sun, Jan 2, 2011 at 8:41 PM, Rafael Ortis wrote: > I have read about it in some forum but I didn't find it on Blender GSoC pages. > Where can i find Matts work? > > > 2011/1/1 Tom M : >> Didn't matts student work on 3dconnexxion as part of GSoC? >> >> Not sure what stage that part of his project achieved but it might be >> worth looking at. >> >> LetterRip >> >> On Sat, Jan 1, 2011 at 8:26 AM, Rafael Ortis wrote: >>> Yes this is interesting! >>> >>> I have installed this drivers but in my initial tests the >>> rotations/translations was a little bit uncontrollable. But I will >>> test with this driver them again. >>> >>> att >>> Rafael Ortis >>> >>> 2011/1/1 Stephen Swaney : Also worth noting is the open source SpaceNav project. They have a drop-in replacement for the 3dconnexion driver that also supports a non-proprietary protocol. Looks interesting. http://spacenav.sourceforge.net/ -- Stephen Swaney sswa...@centurytel.net ___ Bf-committers mailing list Bf-committers@blender.org http://lists.blender.org/mailman/listinfo/bf-committers >>> ___ >>> Bf-committers mailing list >>> Bf-committers@blender.org >>> http://lists.blender.org/mailman/listinfo/bf-committers >>> >> ___ >> Bf-committers mailing list >> Bf-committers@blender.org >> http://lists.blender.org/mailman/listinfo/bf-committers >> > ___ > Bf-committers mailing list > Bf-committers@blender.org > http://lists.blender.org/mailman/listinfo/bf-committers > ___ Bf-committers mailing list Bf-committers@blender.org http://lists.blender.org/mailman/listinfo/bf-committers
Re: [Bf-committers] 3D Connexion ndof support in blender 2.5
I have read about it in some forum but I didn't find it on Blender GSoC pages. Where can i find Matts work? 2011/1/1 Tom M : > Didn't matts student work on 3dconnexxion as part of GSoC? > > Not sure what stage that part of his project achieved but it might be > worth looking at. > > LetterRip > > On Sat, Jan 1, 2011 at 8:26 AM, Rafael Ortis wrote: >> Yes this is interesting! >> >> I have installed this drivers but in my initial tests the >> rotations/translations was a little bit uncontrollable. But I will >> test with this driver them again. >> >> att >> Rafael Ortis >> >> 2011/1/1 Stephen Swaney : >>> Also worth noting is the open source SpaceNav project. >>> >>> They have a drop-in replacement for the 3dconnexion driver >>> that also supports a non-proprietary protocol. Looks >>> interesting. >>> >>> http://spacenav.sourceforge.net/ >>> >>> -- >>> Stephen Swaney >>> sswa...@centurytel.net >>> >>> ___ >>> Bf-committers mailing list >>> Bf-committers@blender.org >>> http://lists.blender.org/mailman/listinfo/bf-committers >>> >> ___ >> Bf-committers mailing list >> Bf-committers@blender.org >> http://lists.blender.org/mailman/listinfo/bf-committers >> > ___ > Bf-committers mailing list > Bf-committers@blender.org > http://lists.blender.org/mailman/listinfo/bf-committers > ___ Bf-committers mailing list Bf-committers@blender.org http://lists.blender.org/mailman/listinfo/bf-committers
Re: [Bf-committers] 3D Connexion ndof support in blender 2.5
Didn't matts student work on 3dconnexxion as part of GSoC? Not sure what stage that part of his project achieved but it might be worth looking at. LetterRip On Sat, Jan 1, 2011 at 8:26 AM, Rafael Ortis wrote: > Yes this is interesting! > > I have installed this drivers but in my initial tests the > rotations/translations was a little bit uncontrollable. But I will > test with this driver them again. > > att > Rafael Ortis > > 2011/1/1 Stephen Swaney : >> Also worth noting is the open source SpaceNav project. >> >> They have a drop-in replacement for the 3dconnexion driver >> that also supports a non-proprietary protocol. Looks >> interesting. >> >> http://spacenav.sourceforge.net/ >> >> -- >> Stephen Swaney >> sswa...@centurytel.net >> >> ___ >> Bf-committers mailing list >> Bf-committers@blender.org >> http://lists.blender.org/mailman/listinfo/bf-committers >> > ___ > Bf-committers mailing list > Bf-committers@blender.org > http://lists.blender.org/mailman/listinfo/bf-committers > ___ Bf-committers mailing list Bf-committers@blender.org http://lists.blender.org/mailman/listinfo/bf-committers
Re: [Bf-committers] 3D Connexion ndof support in blender 2.5
Yes this is interesting! I have installed this drivers but in my initial tests the rotations/translations was a little bit uncontrollable. But I will test with this driver them again. att Rafael Ortis 2011/1/1 Stephen Swaney : > Also worth noting is the open source SpaceNav project. > > They have a drop-in replacement for the 3dconnexion driver > that also supports a non-proprietary protocol. Looks > interesting. > > http://spacenav.sourceforge.net/ > > -- > Stephen Swaney > sswa...@centurytel.net > > ___ > Bf-committers mailing list > Bf-committers@blender.org > http://lists.blender.org/mailman/listinfo/bf-committers > ___ Bf-committers mailing list Bf-committers@blender.org http://lists.blender.org/mailman/listinfo/bf-committers
Re: [Bf-committers] 3D Connexion ndof support in blender 2.5
Also worth noting is the open source SpaceNav project. They have a drop-in replacement for the 3dconnexion driver that also supports a non-proprietary protocol. Looks interesting. http://spacenav.sourceforge.net/ -- Stephen Swaney sswa...@centurytel.net ___ Bf-committers mailing list Bf-committers@blender.org http://lists.blender.org/mailman/listinfo/bf-committers
Re: [Bf-committers] 3D Connexion ndof support in blender 2.5
Hi, Yep, a nice struct, and a pointer in wmWindow. Make sure the pointer is correctly freed, NULLed on copy and NULLed in readfile.c -Ton- Ton Roosendaal Blender Foundation t...@blender.orgwww.blender.org Blender Institute Entrepotdok 57A 1018AD Amsterdam The Netherlands On 1 Jan, 2011, at 18:10, Rafael Ortis wrote: > Thanks Ton, > > Do you mean an dynamically allocated struct? > I will try to make the modifications. :D > > Rafael Ortis > > 2011/1/1 Ton Roosendaal : >> Hi, >> >> OH; forgot for point 1) >> Just make it point to an allocated struct, that way things don't get >> saved in files. >> >> -Ton- >> >> >> Ton Roosendaal Blender Foundation t...@blender.orgwww.blender.org >> Blender Institute Entrepotdok 57A 1018AD Amsterdam The >> Netherlands >> >> On 1 Jan, 2011, at 17:12, Ton Roosendaal wrote: >> >>> Hi, >>> >>> Good news! >>> >>> 1) That's Ok for now, but mark it with /* XXX hack */ to point at >>> that >>> this is potentially wip stuff. Making a struct would be nice too, >>> probably each float has a real meaning, that makes the code >>> readable. >>> >>> 2) If aligning fails, always add variables with a name like "pad". >>> In >>> your case a single "int pad;" is sufficient >>> >>> General note: in 2.49 the code for ndof was spread all around, with >>> exception handling for tools and view manipulations. We really don't >>> want this back, but have the NDOF device deliver nice and well >>> defined >>> events instead. These then can become keymappable. >>> >>> In order to have a NDOF device work *while* using tools (paint, >>> rotate >>> view), we need to add still a parallel queue handling in Blender. >>> Multitouch devices need this too, and there's already been some work >>> on it. I'd advice to not try this for now, I rather have this work >>> done after we've put wm_eventsystem.c completely in sane design. >>> There's too many loose ends there now. :) >>> >>> -Ton- >>> >>> >>> Ton Roosendaal Blender Foundation t...@blender.org >>> www.blender.org >>> Blender Institute Entrepotdok 57A 1018AD Amsterdam The >>> Netherlands >>> >>> On 1 Jan, 2011, at 14:54, Rafael Ortis wrote: >>> I am working on a patch to restore 3d Connexion ndof feature in blender 2.5. My patch is based on the 2.49b version and right now i have been able to restore only the original mode. The other limitation is that blender will only seek for the "3DxNdofBlender.plug" in the current installation folder and not in the user's ~./blender/plugins folder. Since I'm really new to blender code i have some questions: 1. In version 2.49b the last known ndof device state was on window struct : ... float ndof[7]; ... I have placed this in wmWindow. Was this the right place? 2. This modification in wmWindow breaks the alignment of the struct so i have added a 4 bytes with: short ndofAlign[2]; Is this OK? I'm using: Linux (Ubuntu 10.10) gcc version: (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5 3DConnexion device: Space Navigator 3DConnexion driver: 3DConnecion linux version Happy new year!!! att. Rafael Ortis ___ Bf-committers mailing list Bf-committers@blender.org http://lists.blender.org/mailman/listinfo/bf-committers >>> >>> ___ >>> Bf-committers mailing list >>> Bf-committers@blender.org >>> http://lists.blender.org/mailman/listinfo/bf-committers >> >> ___ >> Bf-committers mailing list >> Bf-committers@blender.org >> http://lists.blender.org/mailman/listinfo/bf-committers >> > ___ > Bf-committers mailing list > Bf-committers@blender.org > http://lists.blender.org/mailman/listinfo/bf-committers > ___ Bf-committers mailing list Bf-committers@blender.org http://lists.blender.org/mailman/listinfo/bf-committers
Re: [Bf-committers] 3D Connexion ndof support in blender 2.5
Thanks Ton, Do you mean an dynamically allocated struct? I will try to make the modifications. :D Rafael Ortis 2011/1/1 Ton Roosendaal : > Hi, > > OH; forgot for point 1) > Just make it point to an allocated struct, that way things don't get > saved in files. > > -Ton- > > > Ton Roosendaal Blender Foundation t...@blender.org www.blender.org > Blender Institute Entrepotdok 57A 1018AD Amsterdam The Netherlands > > On 1 Jan, 2011, at 17:12, Ton Roosendaal wrote: > >> Hi, >> >> Good news! >> >> 1) That's Ok for now, but mark it with /* XXX hack */ to point at that >> this is potentially wip stuff. Making a struct would be nice too, >> probably each float has a real meaning, that makes the code readable. >> >> 2) If aligning fails, always add variables with a name like "pad". In >> your case a single "int pad;" is sufficient >> >> General note: in 2.49 the code for ndof was spread all around, with >> exception handling for tools and view manipulations. We really don't >> want this back, but have the NDOF device deliver nice and well defined >> events instead. These then can become keymappable. >> >> In order to have a NDOF device work *while* using tools (paint, rotate >> view), we need to add still a parallel queue handling in Blender. >> Multitouch devices need this too, and there's already been some work >> on it. I'd advice to not try this for now, I rather have this work >> done after we've put wm_eventsystem.c completely in sane design. >> There's too many loose ends there now. :) >> >> -Ton- >> >> >> Ton Roosendaal Blender Foundation t...@blender.org >> www.blender.org >> Blender Institute Entrepotdok 57A 1018AD Amsterdam The >> Netherlands >> >> On 1 Jan, 2011, at 14:54, Rafael Ortis wrote: >> >>> I am working on a patch to restore 3d Connexion ndof feature in >>> blender 2.5. >>> >>> My patch is based on the 2.49b version and right now i have been able >>> to restore only the original mode. The other limitation is that >>> blender will only seek for the "3DxNdofBlender.plug" in the current >>> installation folder and not in the user's ~./blender/plugins folder. >>> >>> Since I'm really new to blender code i have some questions: >>> >>> 1. In version 2.49b the last known ndof device state was on window >>> struct : >>> ... >>> float ndof[7]; >>> ... >>> >>> I have placed this in wmWindow. Was this the right place? >>> >>> 2. This modification in wmWindow breaks the alignment of the struct >>> so >>> i have added a 4 bytes with: >>> >>> short ndofAlign[2]; >>> >>> Is this OK? >>> >>> >>> I'm using: >>> >>> Linux (Ubuntu 10.10) >>> gcc version: (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5 >>> 3DConnexion device: Space Navigator >>> 3DConnexion driver: 3DConnecion linux version >>> >>> Happy new year!!! >>> >>> att. >>> Rafael Ortis >>> ___ >>> Bf-committers mailing list >>> Bf-committers@blender.org >>> http://lists.blender.org/mailman/listinfo/bf-committers >> >> ___ >> Bf-committers mailing list >> Bf-committers@blender.org >> http://lists.blender.org/mailman/listinfo/bf-committers > > ___ > Bf-committers mailing list > Bf-committers@blender.org > http://lists.blender.org/mailman/listinfo/bf-committers > ___ Bf-committers mailing list Bf-committers@blender.org http://lists.blender.org/mailman/listinfo/bf-committers
Re: [Bf-committers] 3D Connexion ndof support in blender 2.5
Hi, OH; forgot for point 1) Just make it point to an allocated struct, that way things don't get saved in files. -Ton- Ton Roosendaal Blender Foundation t...@blender.orgwww.blender.org Blender Institute Entrepotdok 57A 1018AD Amsterdam The Netherlands On 1 Jan, 2011, at 17:12, Ton Roosendaal wrote: > Hi, > > Good news! > > 1) That's Ok for now, but mark it with /* XXX hack */ to point at that > this is potentially wip stuff. Making a struct would be nice too, > probably each float has a real meaning, that makes the code readable. > > 2) If aligning fails, always add variables with a name like "pad". In > your case a single "int pad;" is sufficient > > General note: in 2.49 the code for ndof was spread all around, with > exception handling for tools and view manipulations. We really don't > want this back, but have the NDOF device deliver nice and well defined > events instead. These then can become keymappable. > > In order to have a NDOF device work *while* using tools (paint, rotate > view), we need to add still a parallel queue handling in Blender. > Multitouch devices need this too, and there's already been some work > on it. I'd advice to not try this for now, I rather have this work > done after we've put wm_eventsystem.c completely in sane design. > There's too many loose ends there now. :) > > -Ton- > > > Ton Roosendaal Blender Foundation t...@blender.org > www.blender.org > Blender Institute Entrepotdok 57A 1018AD Amsterdam The > Netherlands > > On 1 Jan, 2011, at 14:54, Rafael Ortis wrote: > >> I am working on a patch to restore 3d Connexion ndof feature in >> blender 2.5. >> >> My patch is based on the 2.49b version and right now i have been able >> to restore only the original mode. The other limitation is that >> blender will only seek for the "3DxNdofBlender.plug" in the current >> installation folder and not in the user's ~./blender/plugins folder. >> >> Since I'm really new to blender code i have some questions: >> >> 1. In version 2.49b the last known ndof device state was on window >> struct : >> ... >> float ndof[7]; >> ... >> >> I have placed this in wmWindow. Was this the right place? >> >> 2. This modification in wmWindow breaks the alignment of the struct >> so >> i have added a 4 bytes with: >> >> short ndofAlign[2]; >> >> Is this OK? >> >> >> I'm using: >> >> Linux (Ubuntu 10.10) >> gcc version: (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5 >> 3DConnexion device: Space Navigator >> 3DConnexion driver: 3DConnecion linux version >> >> Happy new year!!! >> >> att. >> Rafael Ortis >> ___ >> Bf-committers mailing list >> Bf-committers@blender.org >> http://lists.blender.org/mailman/listinfo/bf-committers > > ___ > Bf-committers mailing list > Bf-committers@blender.org > http://lists.blender.org/mailman/listinfo/bf-committers ___ Bf-committers mailing list Bf-committers@blender.org http://lists.blender.org/mailman/listinfo/bf-committers
Re: [Bf-committers] 3D Connexion ndof support in blender 2.5
Hi, Good news! 1) That's Ok for now, but mark it with /* XXX hack */ to point at that this is potentially wip stuff. Making a struct would be nice too, probably each float has a real meaning, that makes the code readable. 2) If aligning fails, always add variables with a name like "pad". In your case a single "int pad;" is sufficient General note: in 2.49 the code for ndof was spread all around, with exception handling for tools and view manipulations. We really don't want this back, but have the NDOF device deliver nice and well defined events instead. These then can become keymappable. In order to have a NDOF device work *while* using tools (paint, rotate view), we need to add still a parallel queue handling in Blender. Multitouch devices need this too, and there's already been some work on it. I'd advice to not try this for now, I rather have this work done after we've put wm_eventsystem.c completely in sane design. There's too many loose ends there now. :) -Ton- Ton Roosendaal Blender Foundation t...@blender.orgwww.blender.org Blender Institute Entrepotdok 57A 1018AD Amsterdam The Netherlands On 1 Jan, 2011, at 14:54, Rafael Ortis wrote: > I am working on a patch to restore 3d Connexion ndof feature in > blender 2.5. > > My patch is based on the 2.49b version and right now i have been able > to restore only the original mode. The other limitation is that > blender will only seek for the "3DxNdofBlender.plug" in the current > installation folder and not in the user's ~./blender/plugins folder. > > Since I'm really new to blender code i have some questions: > > 1. In version 2.49b the last known ndof device state was on window > struct : > ... > float ndof[7]; > ... > > I have placed this in wmWindow. Was this the right place? > > 2. This modification in wmWindow breaks the alignment of the struct so > i have added a 4 bytes with: > > short ndofAlign[2]; > > Is this OK? > > > I'm using: > > Linux (Ubuntu 10.10) > gcc version: (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5 > 3DConnexion device: Space Navigator > 3DConnexion driver: 3DConnecion linux version > > Happy new year!!! > > att. > Rafael Ortis > ___ > Bf-committers mailing list > Bf-committers@blender.org > http://lists.blender.org/mailman/listinfo/bf-committers ___ Bf-committers mailing list Bf-committers@blender.org http://lists.blender.org/mailman/listinfo/bf-committers