Cocoa / Mac:
authorDamien Plisson <damien.plisson@yahoo.fr>
Fri, 23 Oct 2009 12:12:44 +0000 (12:12 +0000)
committerDamien Plisson <damien.plisson@yahoo.fr>
Fri, 23 Oct 2009 12:12:44 +0000 (12:12 +0000)
- tablet : fix pressure retrieval => value sliding now works with tablet, UV-painting is pressure sensitive, and no more crash when clicking on window minimize button with the tablet

- update CMake file to remove unneeded folders in the app bundle (the __MACOSX stuff). From Jens' patch

intern/ghost/intern/GHOST_SystemCocoa.mm
source/creator/CMakeLists.txt

index 2d665012bf1fa868f76200a6bb573b4f43606716..20b190cc41f48da25b86c210691a5b8d11c5b871 100644 (file)
@@ -1046,11 +1046,14 @@ GHOST_TSuccess GHOST_SystemCocoa::handleTabletEvent(void *eventPtr, short eventT
 {
        NSEvent *event = (NSEvent *)eventPtr;
        GHOST_IWindow* window = m_windowManager->getActiveWindow();
+       
+       if (!window) return GHOST_kFailure;
+       
        GHOST_TabletData& ct=((GHOST_WindowCocoa*)window)->GetCocoaTabletData();
        
        switch (eventType) {
                case NSTabletPoint:
-                       ct.Pressure = [event tangentialPressure];
+                       ct.Pressure = [event pressure];
                        ct.Xtilt = [event tilt].x;
                        ct.Ytilt = [event tilt].y;
                        break;
index 28985daf46605516af5b2391303d038e325f7863..57a1f8e00a5756481e5b4c73a65f32e533ddf43d 100644 (file)
@@ -173,6 +173,7 @@ IF(WITH_INSTALL)
                ADD_CUSTOM_COMMAND(
                        TARGET blender POST_BUILD MAIN_DEPENDENCY blender
                        COMMAND find ${TARGETDIR} -name .svn -prune -exec rm -rf {} "\;"
+                       COMMAND find ${TARGETDIR} -name __MACOSX -prune -exec rm -rf {} "\;"
                )