Revision: 39146
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39146
Author:   nexyon
Date:     2011-08-07 15:25:05 +0000 (Sun, 07 Aug 2011)
Log Message:
-----------
Merging trunk up to r39145.

Revision Links:
--------------
    
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39145

Modified Paths:
--------------
    branches/soc-2011-salad/CMakeLists.txt
    branches/soc-2011-salad/build_files/scons/config/darwin-config.py
    branches/soc-2011-salad/intern/ghost/intern/GHOST_SystemSDL.cpp
    branches/soc-2011-salad/intern/ghost/intern/GHOST_SystemWin32.h
    branches/soc-2011-salad/release/scripts/modules/addon_utils.py
    branches/soc-2011-salad/release/scripts/startup/bl_ui/space_userpref.py
    
branches/soc-2011-salad/release/scripts/startup/bl_ui/space_userpref_keymap.py
    branches/soc-2011-salad/release/scripts/startup/bl_ui/space_view3d.py
    
branches/soc-2011-salad/release/scripts/startup/bl_ui/space_view3d_toolbar.py
    branches/soc-2011-salad/source/blender/blenkernel/intern/blender.c
    branches/soc-2011-salad/source/blender/blenloader/intern/readfile.c
    branches/soc-2011-salad/source/blender/blenloader/intern/writefile.c
    branches/soc-2011-salad/source/blender/editors/curve/editfont.c
    branches/soc-2011-salad/source/blender/editors/include/UI_interface.h
    branches/soc-2011-salad/source/blender/editors/interface/interface.c
    
branches/soc-2011-salad/source/blender/editors/interface/interface_handlers.c
    branches/soc-2011-salad/source/blender/editors/interface/interface_icons.c
    branches/soc-2011-salad/source/blender/editors/interface/interface_layout.c
    branches/soc-2011-salad/source/blender/editors/interface/interface_regions.c
    branches/soc-2011-salad/source/blender/editors/interface/interface_style.c
    
branches/soc-2011-salad/source/blender/editors/interface/interface_templates.c
    branches/soc-2011-salad/source/blender/editors/interface/interface_utils.c
    branches/soc-2011-salad/source/blender/editors/interface/interface_widgets.c
    branches/soc-2011-salad/source/blender/editors/interface/resources.c
    branches/soc-2011-salad/source/blender/editors/object/object_edit.c
    branches/soc-2011-salad/source/blender/editors/space_image/image_ops.c
    branches/soc-2011-salad/source/blender/editors/space_view3d/view3d_edit.c
    branches/soc-2011-salad/source/blender/makesdna/DNA_userdef_types.h
    branches/soc-2011-salad/source/blender/makesdna/DNA_windowmanager_types.h
    branches/soc-2011-salad/source/blender/makesrna/intern/rna_internal.h
    branches/soc-2011-salad/source/blender/makesrna/intern/rna_scene.c
    branches/soc-2011-salad/source/blender/makesrna/intern/rna_userdef.c
    branches/soc-2011-salad/source/blender/makesrna/intern/rna_wm.c
    branches/soc-2011-salad/source/blender/makesrna/intern/rna_wm_api.c
    branches/soc-2011-salad/source/blender/python/intern/bpy_operator.c
    branches/soc-2011-salad/source/blender/python/intern/bpy_rna.c
    branches/soc-2011-salad/source/blender/python/intern/bpy_rna.h
    branches/soc-2011-salad/source/blender/windowmanager/WM_api.h
    branches/soc-2011-salad/source/blender/windowmanager/intern/wm.c
    
branches/soc-2011-salad/source/blender/windowmanager/intern/wm_event_system.c
    branches/soc-2011-salad/source/blender/windowmanager/intern/wm_files.c
    branches/soc-2011-salad/source/blender/windowmanager/intern/wm_keymap.c
    branches/soc-2011-salad/source/blender/windowmanager/intern/wm_operators.c
    branches/soc-2011-salad/source/blenderplayer/bad_level_call_stubs/stubs.c

Added Paths:
-----------
    branches/soc-2011-salad/source/blender/windowmanager/WM_keymap.h

Property Changed:
----------------
    branches/soc-2011-salad/


Property changes on: branches/soc-2011-salad
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30783,30792-30793,30797-30798,30815
/branches/soc-2011-carrot:36828-39099
/branches/soc-2011-cucumber:36829-36994
/branches/soc-2011-onion:36833-38309
/branches/soc-2011-pepper:36830-38934
/branches/soc-2011-tomato:36831-39069
/trunk/blender:36834-39050
   + /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30783,30792-30793,30797-30798,30815
/branches/soc-2011-carrot:36828-39099
/branches/soc-2011-cucumber:36829-36994
/branches/soc-2011-onion:36833-38309
/branches/soc-2011-pepper:36830-38934
/branches/soc-2011-tomato:36831-39069
/trunk/blender:36834-39145

Modified: branches/soc-2011-salad/CMakeLists.txt
===================================================================
--- branches/soc-2011-salad/CMakeLists.txt      2011-08-07 15:06:35 UTC (rev 
39145)
+++ branches/soc-2011-salad/CMakeLists.txt      2011-08-07 15:25:05 UTC (rev 
39146)
@@ -1014,6 +1014,10 @@
                        if(NOT 3D_CONNEXION_CLIENT_LIBRARY)
                                set(WITH_INPUT_NDOF OFF)
                        endif()
+
+                       if(WITH_INPUT_NDOF)
+                               set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} 
-weak_framework 3DconnexionClient")
+                       endif()
                endif()
 
        else()

Modified: branches/soc-2011-salad/build_files/scons/config/darwin-config.py
===================================================================
--- branches/soc-2011-salad/build_files/scons/config/darwin-config.py   
2011-08-07 15:06:35 UTC (rev 39145)
+++ branches/soc-2011-salad/build_files/scons/config/darwin-config.py   
2011-08-07 15:25:05 UTC (rev 39146)
@@ -21,14 +21,17 @@
 MAC_PROC=commands.getoutput(cmd) 
 cmd = 'uname -r'
 cmd_res=commands.getoutput(cmd) 
-if cmd_res[0]=='7':
+MAC_CUR_VER='10.5' # by default (test below fails on my 10.5 PowerPC)
+if cmd_res[:2]=='7':
        MAC_CUR_VER='10.3'
-elif cmd_res[0]=='8':
+elif cmd_res[:2]=='8':
        MAC_CUR_VER='10.4'
-elif cmd_res[0]=='9':
+elif cmd_res[:2]=='9':
        MAC_CUR_VER='10.5'
-elif cmd_res[0]=='10':
+elif cmd_res[:2]=='10':
        MAC_CUR_VER='10.6'
+elif cmd_res[:2]=='11':
+       MAC_CUR_VER='10.7'
 
 if MACOSX_ARCHITECTURE == 'x86_64' or MACOSX_ARCHITECTURE == 'ppc64':
        USE_QTKIT=True # Carbon quicktime is not available for 64bit
@@ -37,8 +40,8 @@
 # Default target OSX settings per architecture
 # Can be customized
 
-if MACOSX_ARCHITECTURE == 'ppc':
-# ppc release are now made for 10.4
+if MACOSX_ARCHITECTURE == 'ppc' and MAC_CUR_VER == '10.4':
+# all releases are now made for 10.5 !
 #      MAC_MIN_VERS = '10.3'
 #      MACOSX_SDK='/Developer/SDKs/MacOSX10.3.9.sdk'
 #      LCGDIR = '#../lib/darwin-6.1-powerpc'
@@ -50,13 +53,21 @@
        LCGDIR = '#../lib/darwin-8.0.0-powerpc'
        CC = 'gcc-4.0'
        CXX = 'g++-4.0'
-elif MACOSX_ARCHITECTURE == 'i386':
+elif MACOSX_ARCHITECTURE == 'i386' and MAC_CUR_VER == '10.4':
        MAC_MIN_VERS = '10.4'
        MACOSX_DEPLOYMENT_TARGET = '10.4'
        MACOSX_SDK='/Developer/SDKs/MacOSX10.4u.sdk'
        LCGDIR = '#../lib/darwin-8.x.i386'
        CC = 'gcc-4.0'
        CXX = 'g++-4.0'
+elif MAC_CUR_VER >= '10.6':
+       # OSX 10.6 and 10.7 developer tools do not come with sdk < 10.6 anymore 
!
+       MAC_MIN_VERS = '10.6'
+       MACOSX_DEPLOYMENT_TARGET = '10.6'
+       MACOSX_SDK='/Developer/SDKs/MacOSX10.6.sdk'
+       LCGDIR = '#../lib/darwin-9.x.universal'
+       CC = 'llvm-gcc-4.2'
+       CXX = 'llvm-g++-4.2'
 else :
        MAC_MIN_VERS = '10.5'
        MACOSX_DEPLOYMENT_TARGET = '10.5'
@@ -71,8 +82,8 @@
 ###################          Dependency settings           ##################
 #############################################################################
 
-#Defaults openMP to true if compiler (currently only gcc 4.2) handles it
-if CC == 'gcc-4.2':
+#Defaults openMP to true if compiler handles it
+if CC == 'gcc-4.2' or CC == 'llvm-gcc-4.2':
     WITH_BF_OPENMP = True  # multithreading for fluids, cloth and smoke
 else:
     WITH_BF_OPENMP = False

Modified: branches/soc-2011-salad/intern/ghost/intern/GHOST_SystemSDL.cpp
===================================================================
--- branches/soc-2011-salad/intern/ghost/intern/GHOST_SystemSDL.cpp     
2011-08-07 15:06:35 UTC (rev 39145)
+++ branches/soc-2011-salad/intern/ghost/intern/GHOST_SystemSDL.cpp     
2011-08-07 15:25:05 UTC (rev 39146)
@@ -180,6 +180,7 @@
                GXMAP(type,SDL_SCANCODE_RCTRL,          GHOST_kKeyRightControl);
                GXMAP(type,SDL_SCANCODE_LALT,           GHOST_kKeyLeftAlt);
                GXMAP(type,SDL_SCANCODE_RALT,           GHOST_kKeyRightAlt);
+               GXMAP(type,SDL_SCANCODE_LGUI,           GHOST_kKeyOS);
                GXMAP(type,SDL_SCANCODE_RGUI,           GHOST_kKeyOS);
 
                GXMAP(type,SDL_SCANCODE_INSERT,         GHOST_kKeyInsert);
@@ -228,6 +229,7 @@
         GXMAP(type,SDL_SCANCODE_AUDIONEXT,      GHOST_kKeyMediaLast);
 
                default:
+                       printf("Unknown\n");
                        type= GHOST_kKeyUnknown;
                        break;
                }
@@ -372,6 +374,7 @@
        case SDL_KEYUP:
                {
                        SDL_KeyboardEvent &sdl_sub_evt= sdl_event->key;
+                       SDL_Keycode sym= sdl_sub_evt.keysym.sym;
                        GHOST_TEventType type= (sdl_sub_evt.state == 
SDL_PRESSED) ? GHOST_kEventKeyDown : GHOST_kEventKeyUp;
 
                        GHOST_WindowSDL *window= 
findGhostWindow(SDL_GetWindowFromID(sdl_sub_evt.windowID));
@@ -379,7 +382,45 @@
 
                        GHOST_TKey gkey= 
convertSDLKey(sdl_sub_evt.keysym.scancode);
                        /* note, the sdl_sub_evt.keysym.sym is truncated, for 
unicode support ghost has to be modified */
-                       g_event= new GHOST_EventKey(getMilliSeconds(), type, 
window, gkey, sdl_sub_evt.keysym.sym);
+                       if(sym > 127) {
+                               sym= 0;
+                       }
+                       else {
+                               if(sdl_sub_evt.keysym.mod & 
(KMOD_LSHIFT|KMOD_RSHIFT)) {
+                                       /* lame US keyboard assumptions */
+                                       if(sym >= 'a' && sym <= ('a' + 32)) {
+                                               sym -= 32;
+                                       }
+                                       else {
+                                               switch(sym) {
+                                                       case '`': sym= '~'; 
break;
+                                                       case '1': sym= '!'; 
break;
+                                                       case '2': sym= '@'; 
break;
+                                                       case '3': sym= '#'; 
break;
+                                                       case '4': sym= '$'; 
break;
+                                                       case '5': sym= '%'; 
break;
+                                                       case '6': sym= '^'; 
break;
+                                                       case '7': sym= '&'; 
break;
+                                                       case '8': sym= '*'; 
break;
+                                                       case '9': sym= '('; 
break;
+                                                       case '0': sym= ')'; 
break;
+                                                       case '-': sym= '_'; 
break;
+                                                       case '=': sym= '+'; 
break;
+                                                       case '[': sym= '{'; 
break;
+                                                       case ']': sym= '}'; 
break;
+                                                       case '\\': sym= '|'; 
break;
+                                                       case ';': sym= ':'; 
break;
+                                                       case '\'': sym= '"'; 
break;
+                                                       case ',': sym= '<'; 
break;
+                                                       case '.': sym= '>'; 
break;
+                                                       case '/': sym= '?'; 
break;
+                                                       default:            
break;
+                                               }
+                                       }
+                               }
+                       }
+
+                       g_event= new GHOST_EventKey(getMilliSeconds(), type, 
window, gkey, sym);
                }
                break;
        }

Modified: branches/soc-2011-salad/intern/ghost/intern/GHOST_SystemWin32.h
===================================================================
--- branches/soc-2011-salad/intern/ghost/intern/GHOST_SystemWin32.h     
2011-08-07 15:06:35 UTC (rev 39145)
+++ branches/soc-2011-salad/intern/ghost/intern/GHOST_SystemWin32.h     
2011-08-07 15:25:05 UTC (rev 39146)
@@ -302,6 +302,7 @@
         */
        static void processMinMaxInfo(MINMAXINFO * minmax);
 
+#ifdef WITH_INPUT_NDOF
        /**
         * Handles Motion and Button events from a SpaceNavigator or related 
device.
         * Instead of returning an event object, this function communicates 
directly
@@ -310,6 +311,7 @@
         * @return Whether an event was generated and sent.
         */
        bool processNDOF(RAWINPUT const& raw);
+#endif
 
        /**
         * Returns the local state of the modifier keys (from the message 
queue).

Modified: branches/soc-2011-salad/release/scripts/modules/addon_utils.py
===================================================================
--- branches/soc-2011-salad/release/scripts/modules/addon_utils.py      
2011-08-07 15:06:35 UTC (rev 39145)
+++ branches/soc-2011-salad/release/scripts/modules/addon_utils.py      
2011-08-07 15:25:05 UTC (rev 39146)
@@ -32,6 +32,7 @@
 
 
 error_duplicates = False
+error_encoding = False
 
 
 def paths():
@@ -51,14 +52,18 @@
 
 def modules(module_cache):
     global error_duplicates
+    global error_encoding
     import os
 
     error_duplicates = False
+    error_encoding = False
 
     path_list = paths()
 
     # fake module importing
     def fake_module(mod_name, mod_path, speedy=True):
+        global error_encoding
+
         if _bpy.app.debug:
             print("fake_module", mod_path, mod_name)
         import ast
@@ -69,12 +74,28 @@
             line_iter = iter(file_mod)
             l = ""
             while not l.startswith("bl_info"):
-                l = line_iter.readline()
+                try:
+                    l = line_iter.readline()
+                except UnicodeDecodeError as e:
+                    if not error_encoding:
+                        error_encoding = True
+                        print("Error reading file as UTF-8:", mod_path, e)
+                    file_mod.close()
+                    return None
+
                 if len(l) == 0:
                     break
             while l.rstrip():
                 lines.append(l)
-                l = line_iter.readline()
+                try:
+                    l = line_iter.readline()
+                except UnicodeDecodeError as e:
+                    if not error_encoding:
+                        error_encoding = True
+                        print("Error reading file as UTF-8:", mod_path, e)
+                    file_mod.close()
+                    return None
+
             data = "".join(lines)
 
         else:

Modified: 
branches/soc-2011-salad/release/scripts/startup/bl_ui/space_userpref.py
===================================================================
--- branches/soc-2011-salad/release/scripts/startup/bl_ui/space_userpref.py     
2011-08-07 15:06:35 UTC (rev 39145)
+++ branches/soc-2011-salad/release/scripts/startup/bl_ui/space_userpref.py     
2011-08-07 15:25:05 UTC (rev 39146)
@@ -759,6 +759,31 @@
 from bl_ui.space_userpref_keymap import InputKeyMapPanel
 
 
+class USERPREF_MT_ndof_settings(bpy.types.Menu):
+    # accessed from the window keybindings in C (only)
+    bl_label = "3D Mouse Settings"
+
+    def draw(self, context):
+        layout = self.layout
+        input_prefs = context.user_preferences.inputs
+
+        layout.separator()
+        layout.prop(input_prefs, "ndof_sensitivity")
+
+        if context.space_data.type == 'VIEW_3D':
+            layout.separator()
+            layout.prop(input_prefs, "ndof_show_guide")
+
+            layout.separator()
+            layout.label(text="orbit options")
+            layout.prop(input_prefs, "ndof_orbit_invert_axes")
+

@@ Diff output truncated at 10240 characters. @@
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to