Revision: 39121
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39121
Author:   nazgul
Date:     2011-08-07 08:56:13 +0000 (Sun, 07 Aug 2011)
Log Message:
-----------
Merging r39102 through r39120 from trunk into soc-2011-tomato

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

Modified Paths:
--------------
    branches/soc-2011-tomato/build_files/scons/config/darwin-config.py
    branches/soc-2011-tomato/intern/ghost/intern/GHOST_SystemWin32.h
    branches/soc-2011-tomato/release/scripts/modules/addon_utils.py
    branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_userpref.py
    branches/soc-2011-tomato/source/blender/editors/include/UI_interface.h
    branches/soc-2011-tomato/source/blender/editors/interface/interface.c
    
branches/soc-2011-tomato/source/blender/editors/interface/interface_handlers.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface_layout.c
    
branches/soc-2011-tomato/source/blender/editors/interface/interface_regions.c
    
branches/soc-2011-tomato/source/blender/editors/interface/interface_templates.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface_utils.c
    branches/soc-2011-tomato/source/blender/editors/space_image/image_ops.c
    branches/soc-2011-tomato/source/blender/editors/space_view3d/view3d_edit.c
    branches/soc-2011-tomato/source/blender/makesdna/DNA_userdef_types.h
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_userdef.c
    
branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_event_system.c

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


Property changes on: branches/soc-2011-tomato
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/blender:36831-39101
   + /trunk/blender:36831-39120

Modified: branches/soc-2011-tomato/build_files/scons/config/darwin-config.py
===================================================================
--- branches/soc-2011-tomato/build_files/scons/config/darwin-config.py  
2011-08-07 06:22:50 UTC (rev 39120)
+++ branches/soc-2011-tomato/build_files/scons/config/darwin-config.py  
2011-08-07 08:56:13 UTC (rev 39121)
@@ -21,6 +21,7 @@
 MAC_PROC=commands.getoutput(cmd) 
 cmd = 'uname -r'
 cmd_res=commands.getoutput(cmd) 
+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[:2]=='8':

Modified: branches/soc-2011-tomato/intern/ghost/intern/GHOST_SystemWin32.h
===================================================================
--- branches/soc-2011-tomato/intern/ghost/intern/GHOST_SystemWin32.h    
2011-08-07 06:22:50 UTC (rev 39120)
+++ branches/soc-2011-tomato/intern/ghost/intern/GHOST_SystemWin32.h    
2011-08-07 08:56:13 UTC (rev 39121)
@@ -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-tomato/release/scripts/modules/addon_utils.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/modules/addon_utils.py     
2011-08-07 06:22:50 UTC (rev 39120)
+++ branches/soc-2011-tomato/release/scripts/modules/addon_utils.py     
2011-08-07 08:56:13 UTC (rev 39121)
@@ -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-tomato/release/scripts/startup/bl_ui/space_userpref.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_userpref.py    
2011-08-07 06:22:50 UTC (rev 39120)
+++ branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_userpref.py    
2011-08-07 08:56:13 UTC (rev 39121)
@@ -949,6 +949,12 @@
                             "(see console for details)",
                             )
 
+        if addon_utils.error_encoding:
+            self.draw_error(col,
+                            "One or more addons do not have UTF-8 encoding\n"
+                            "(see console for details)",
+                            )
+
         filter = context.window_manager.addon_filter
         search = context.window_manager.addon_search.lower()
         support = context.window_manager.addon_support

Modified: branches/soc-2011-tomato/source/blender/editors/include/UI_interface.h
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/include/UI_interface.h      
2011-08-07 06:22:50 UTC (rev 39120)
+++ branches/soc-2011-tomato/source/blender/editors/include/UI_interface.h      
2011-08-07 08:56:13 UTC (rev 39121)
@@ -411,6 +411,7 @@
 uiBut *uiDefButC(uiBlock *block, int type, int retval, const char *str, int 
x1, int y1, short x2, short y2, char *poin, float min, float max, float a1, 
float a2, const char *tip);
 uiBut *uiDefButBitC(uiBlock *block, int type, int bit, int retval, const char 
*str, int x1, int y1, short x2, short y2, char *poin, float min, float max, 
float a1, float a2, const char *tip);
 uiBut *uiDefButR(uiBlock *block, int type, int retval, const char *str, int 
x1, int y1, short x2, short y2, struct PointerRNA *ptr, const char *propname, 
int index, float min, float max, float a1, float a2, const char *tip);
+uiBut *uiDefButR_prop(uiBlock *block, int type, int retval, const char *str, 
int x1, int y1, short x2, short y2, struct PointerRNA *ptr, struct PropertyRNA 
*prop, int index, float min, float max, float a1, float a2, const char *tip);
 uiBut *uiDefButO(uiBlock *block, int type, const char *opname, int opcontext, 
const char *str, int x1, int y1, short x2, short y2, const char *tip);
 uiBut *uiDefButTextO(uiBlock *block, int type, const char *opname, int 
opcontext, const char *str, int x1, int y1, short x2, short y2, void *poin, 
float min, float max, float a1, float a2, const char *tip);
 
@@ -430,6 +431,7 @@
 uiBut *uiDefIconButC(uiBlock *block, int type, int retval, int icon, int x1, 
int y1, short x2, short y2, char *poin, float min, float max, float a1, float 
a2, const char *tip);
 uiBut *uiDefIconButBitC(uiBlock *block, int type, int bit, int retval, int 
icon, int x1, int y1, short x2, short y2, char *poin, float min, float max, 
float a1, float a2, const char *tip);
 uiBut *uiDefIconButR(uiBlock *block, int type, int retval, int icon, int x1, 
int y1, short x2, short y2, struct PointerRNA *ptr, const char *propname, int 
index, float min, float max, float a1, float a2, const char *tip);
+uiBut *uiDefIconButR_prop(uiBlock *block, int type, int retval, int icon, int 
x1, int y1, short x2, short y2, struct PointerRNA *ptr, PropertyRNA *prop, int 
index, float min, float max, float a1, float a2, const char *tip);
 uiBut *uiDefIconButO(uiBlock *block, int type, const char *opname, int 
opcontext, int icon, int x1, int y1, short x2, short y2, const char *tip);
 
 uiBut *uiDefIconTextBut(uiBlock *block,
@@ -448,6 +450,7 @@
 uiBut *uiDefIconTextButC(uiBlock *block, int type, int retval, int icon, const 
char *str, int x1, int y1, short x2, short y2, char *poin, float min, float 
max, float a1, float a2, const char *tip);
 uiBut *uiDefIconTextButBitC(uiBlock *block, int type, int bit, int retval, int 
icon, const char *str, int x1, int y1, short x2, short y2, char *poin, float 
min, float max, float a1, float a2, const char *tip);
 uiBut *uiDefIconTextButR(uiBlock *block, int type, int retval, int icon, const 
char *str, int x1, int y1, short x2, short y2, struct PointerRNA *ptr, const 
char *propname, int index, float min, float max, float a1, float a2, const char 
*tip);
+uiBut *uiDefIconTextButR_prop(uiBlock *block, int type, int retval, int icon, 
const char *str, int x1, int y1, short x2, short y2, struct PointerRNA *ptr, 
struct PropertyRNA *prop, int index, float min, float max, float a1, float a2, 
const char *tip);
 uiBut *uiDefIconTextButO(uiBlock *block, int type, const char *opname, int 
opcontext, int icon, const char *str, int x1, int y1, short x2, short y2, const 
char *tip);
 
 /* for passing inputs to ButO buttons */

Modified: branches/soc-2011-tomato/source/blender/editors/interface/interface.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/interface/interface.c       
2011-08-07 06:22:50 UTC (rev 39120)
+++ branches/soc-2011-tomato/source/blender/editors/interface/interface.c       
2011-08-07 08:56:13 UTC (rev 39121)
@@ -2490,138 +2490,141 @@
        return but;
 }
 
-static uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, const char 
*str, int x1, int y1, short x2, short y2, PointerRNA *ptr, const char 
*propname, int index, float min, float max, float a1, float a2,  const char 
*tip)
+/* ui_def_but_rna_propname and ui_def_but_rna
+ * both take the same args except for propname vs prop, this is done so we can
+ * avoid an extra lookup on 'prop' when its already available.
+ *
+ * When this kind of change won't disrupt branches, best look into making more
+ * of our UI functions take prop rather then propname.
+ */
+
+#define UI_DEF_BUT_RNA_DISABLE(but) \
+       but->flag |= UI_BUT_DISABLED; \
+       but->lock = 1; \
+       but->lockstr = ""
+
+
+static uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, const char 
*str, int x1, int y1, short x2, short y2, PointerRNA *ptr, PropertyRNA *prop, 
int index, float min, float max, float a1, float a2,  const char *tip)
 {
        uiBut *but;
-       PropertyRNA *prop;
        PropertyType proptype;
        int freestr= 0, icon= 0;
 
-       prop= RNA_struct_find_property(ptr, propname);
+       proptype= RNA_property_type(prop);
 
-       if(prop) {
-               proptype= RNA_property_type(prop);
+       /* use rna values if parameters are not specified */
+       if(!str) {
+               if(type == MENU && proptype == PROP_ENUM) {
+                       EnumPropertyItem *item;
+                       DynStr *dynstr;
+                       int i, totitem, value, free;
 
-               /* use rna values if parameters are not specified */
-               if(!str) {
-                       if(type == MENU && proptype == PROP_ENUM) {
-                               EnumPropertyItem *item;
-                               DynStr *dynstr;
-                               int i, totitem, value, free;
+                       RNA_property_enum_items(block->evil_C, ptr, prop, 
&item, &totitem, &free);
+                       value= RNA_property_enum_get(ptr, prop);
 
-                               RNA_property_enum_items(block->evil_C, ptr, 
prop, &item, &totitem, &free);

@@ 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