[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38647] branches/merwin-spacenav/intern/ ghost/intern/GHOST_NDOFManagerCocoa.mm: minor cleanup of Mac ndof manager

Mike Erwin significant.bit at gmail.com
Sun Jul 24 02:52:18 CEST 2011


Revision: 38647
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38647
Author:   merwin
Date:     2011-07-24 00:52:18 +0000 (Sun, 24 Jul 2011)
Log Message:
-----------
minor cleanup of Mac ndof manager

Modified Paths:
--------------
    branches/merwin-spacenav/intern/ghost/intern/GHOST_NDOFManagerCocoa.mm

Modified: branches/merwin-spacenav/intern/ghost/intern/GHOST_NDOFManagerCocoa.mm
===================================================================
--- branches/merwin-spacenav/intern/ghost/intern/GHOST_NDOFManagerCocoa.mm	2011-07-24 00:40:39 UTC (rev 38646)
+++ branches/merwin-spacenav/intern/ghost/intern/GHOST_NDOFManagerCocoa.mm	2011-07-24 00:52:18 UTC (rev 38647)
@@ -41,7 +41,7 @@
 	{
 	printf("ndof: device added\n"); // change these: printf --> informational reports
 
-#if 0 // device preferences will be useful soon
+#if 0 // device preferences will be useful some day
 	ConnexionDevicePrefs p;
 	ConnexionGetCurrentDevicePrefs(kDevID_AnyDevice, &p);
 #endif
@@ -74,10 +74,13 @@
 				{
 				case kConnexionCmdHandleAxis:
 					{
+					// convert to blender view coordinates
 					short t[3] = {s->axis[0], -(s->axis[2]), s->axis[1]};
 					short r[3] = {-(s->axis[3]), s->axis[5], -(s->axis[4])};
+
 					ndof_manager->updateTranslation(t, now);
 					ndof_manager->updateRotation(r, now);
+
 					ghost_system->notifyExternalEventProcessed();
 					break;
 					}
@@ -98,7 +101,8 @@
 			break;
 			}
 		case kConnexionMsgPrefsChanged:
-			printf("ndof: prefs changed\n"); // this includes app switches
+			// printf("ndof: prefs changed\n"); // this includes app switches
+			// TODO: look through updated prefs for things blender cares about
 			break;
 		case kConnexionMsgCalibrateDevice:
 			printf("ndof: calibrate\n"); // but what should blender do?
@@ -134,7 +138,7 @@
 		m_clientID = RegisterConnexionClient('blnd', (UInt8*) "\007blender",
 			kConnexionClientModeTakeOver, kConnexionMaskAll);
 
-		printf("ndof: client id = %d\n", m_clientID);
+		// printf("ndof: client id = %d\n", m_clientID);
 
 		if (SetConnexionClientButtonMask != NULL)
 			{
@@ -161,7 +165,8 @@
 
 bool GHOST_NDOFManagerCocoa::available()
 	{
-//	extern OSErr InstallConnexionHandlers() __attribute__((weak_import));
-// ^-- not needed since the entire framework is weak-linked
+	// extern OSErr InstallConnexionHandlers() __attribute__((weak_import));
+	// ^^ not needed since the entire framework is weak-linked
 	return InstallConnexionHandlers != NULL;
+	// this means that the driver is installed and dynamically linked to blender
 	}




More information about the Bf-blender-cvs mailing list