From 068ab484aca1af7654d8a710d6a2636f13641a72 Mon Sep 17 00:00:00 2001 From: Damien Plisson Date: Fri, 23 Oct 2009 12:12:44 +0000 Subject: [PATCH] Cocoa / Mac: - 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 | 5 ++++- source/creator/CMakeLists.txt | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm index 2d665012bf1..20b190cc41f 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.mm +++ b/intern/ghost/intern/GHOST_SystemCocoa.mm @@ -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; diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 28985daf466..57a1f8e00a5 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -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 {} "\;" )