Revision: 37002
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37002
Author:   jwilkins
Date:     2011-05-29 14:38:15 +0000 (Sun, 29 May 2011)
Log Message:
-----------
Merged with trunk: 36982-37001
This is in preparation to merge with soc-2010-jwilkins

Modified Paths:
--------------
    branches/soc-2011-onion/intern/ffmpeg/ffmpeg_compat.h
    branches/soc-2011-onion/intern/ghost/intern/GHOST_SystemX11.cpp
    branches/soc-2011-onion/intern/ghost/intern/GHOST_WindowX11.cpp
    branches/soc-2011-onion/intern/ghost/intern/GHOST_WindowX11.h
    branches/soc-2011-onion/source/blender/blenkernel/intern/text.c
    branches/soc-2011-onion/source/blender/python/generic/bpy_internal_import.c
    branches/soc-2011-onion/source/blender/python/intern/bpy_rna.c
    branches/soc-2011-onion/source/blender/render/intern/source/shadeinput.c
    branches/soc-2011-onion/source/gameengine/Expressions/PyObjectPlus.cpp
    branches/soc-2011-onion/source/gameengine/GameLogic/SCA_PythonController.cpp
    branches/soc-2011-onion/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp

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


Property changes on: branches/soc-2011-onion
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/blender:36833-36973
   + /trunk/blender:36833-36973,36982-37001

Modified: branches/soc-2011-onion/intern/ffmpeg/ffmpeg_compat.h
===================================================================
--- branches/soc-2011-onion/intern/ffmpeg/ffmpeg_compat.h       2011-05-29 
14:26:35 UTC (rev 37001)
+++ branches/soc-2011-onion/intern/ffmpeg/ffmpeg_compat.h       2011-05-29 
14:38:15 UTC (rev 37002)
@@ -40,7 +40,7 @@
 #define FFMPEG_HAVE_AVIO 1
 #endif
 
-#if (LIBAVFORMAT_VERSION_MAJOR > 53) || ((LIBAVFORMAT_VERSION_MAJOR >= 53) && 
(LIBAVFORMAT_VERSION_MINOR >= 1))
+#if (LIBAVCODEC_VERSION_MAJOR > 53) || ((LIBAVCODEC_VERSION_MAJOR == 53) && 
(LIBAVCODEC_VERSION_MINOR > 1)) || ((LIBAVCODEC_VERSION_MAJOR == 53) && 
(LIBAVCODEC_VERSION_MINOR == 1) && (LIBAVCODEC_VERSION_MICRO >= 1))
 #define FFMPEG_HAVE_DEFAULT_VAL_UNION 1
 #endif
 

Modified: branches/soc-2011-onion/intern/ghost/intern/GHOST_SystemX11.cpp
===================================================================
--- branches/soc-2011-onion/intern/ghost/intern/GHOST_SystemX11.cpp     
2011-05-29 14:26:35 UTC (rev 37001)
+++ branches/soc-2011-onion/intern/ghost/intern/GHOST_SystemX11.cpp     
2011-05-29 14:38:15 UTC (rev 37002)
@@ -795,6 +795,7 @@
                }
                
                default: {
+#ifdef WITH_X11_XINPUT
                        if(xe->type == window->GetXTablet().MotionEvent) 
                        {
                                XDeviceMotionEvent* data = 
(XDeviceMotionEvent*)xe;
@@ -818,7 +819,7 @@
                        }
                        else if(xe->type == window->GetXTablet().ProxOutEvent)
                                window->GetXTablet().CommonData.Active= 
GHOST_kTabletModeNone;
-
+#endif // WITH_X11_XINPUT
                        break;
                }
        }

Modified: branches/soc-2011-onion/intern/ghost/intern/GHOST_WindowX11.cpp
===================================================================
--- branches/soc-2011-onion/intern/ghost/intern/GHOST_WindowX11.cpp     
2011-05-29 14:26:35 UTC (rev 37001)
+++ branches/soc-2011-onion/intern/ghost/intern/GHOST_WindowX11.cpp     
2011-05-29 14:38:15 UTC (rev 37002)
@@ -182,9 +182,12 @@
        Atom atoms[2];
        int natom;
        int glxVersionMajor, glxVersionMinor; // As in GLX major.minor
-       
+
+#ifdef WITH_X11_XINPUT
        /* initialize incase X11 fails to load */
        memset(&m_xtablet, 0, sizeof(m_xtablet));
+#endif
+
        m_visual= NULL;
 
        if (!glXQueryVersion(m_display, &glxVersionMajor, &glxVersionMinor)) {

Modified: branches/soc-2011-onion/intern/ghost/intern/GHOST_WindowX11.h
===================================================================
--- branches/soc-2011-onion/intern/ghost/intern/GHOST_WindowX11.h       
2011-05-29 14:26:35 UTC (rev 37001)
+++ branches/soc-2011-onion/intern/ghost/intern/GHOST_WindowX11.h       
2011-05-29 14:38:15 UTC (rev 37002)
@@ -38,7 +38,9 @@
 #include <X11/Xlib.h>
 #include <GL/glx.h>
 // For tablets
-#include <X11/extensions/XInput.h>
+#ifdef WITH_X11_XINPUT
+#  include <X11/extensions/XInput.h>
+#endif
 
 #include <map>
 
@@ -190,7 +192,7 @@
                Window 
        getXWindow(
        );      
-
+#ifdef WITH_X11_XINPUT
        class XTablet
        {
        public:
@@ -214,6 +216,10 @@
 
        const GHOST_TabletData* GetTabletData()
        { return &m_xtablet.CommonData; }
+#else // WITH_X11_XINPUT
+       const GHOST_TabletData* GetTabletData()
+       { return NULL; }
+#endif // WITH_X11_XINPUT
 
        /*
         * Need this in case that we want start the window
@@ -321,7 +327,9 @@
        getEmptyCursor(
        );
 
+#ifdef WITH_X11_XINPUT
        void initXInputDevices();
+#endif
        
        GLXContext      m_context;
        Window  m_window;
@@ -350,8 +358,10 @@
        /** Cache of XC_* ID's to XCursor structures */
        std::map<unsigned int, Cursor> m_standard_cursors;
 
+#ifdef WITH_X11_XINPUT
        /* Tablet devices */
        XTablet m_xtablet;
+#endif
 
        void icccmSetState(int state);
        int icccmGetState() const;

Modified: branches/soc-2011-onion/source/blender/blenkernel/intern/text.c
===================================================================
--- branches/soc-2011-onion/source/blender/blenkernel/intern/text.c     
2011-05-29 14:26:35 UTC (rev 37001)
+++ branches/soc-2011-onion/source/blender/blenkernel/intern/text.c     
2011-05-29 14:38:15 UTC (rev 37002)
@@ -238,7 +238,7 @@
 int reopen_text(Text *text)
 {
        FILE *fp;
-       int i, llen, len, res;
+       int i, llen, len;
        unsigned char *buffer;
        TextLine *tmp;
        char str[FILE_MAXDIR+FILE_MAXFILE];
@@ -281,7 +281,7 @@
 
        fclose(fp);
 
-       res= stat(str, &st);
+       stat(str, &st);
        text->mtime= st.st_mtime;
        
        text->nlines=0;
@@ -334,7 +334,7 @@
 {
        Main *bmain= G.main;
        FILE *fp;
-       int i, llen, len, res;
+       int i, llen, len;
        unsigned char *buffer;
        TextLine *tmp;
        Text *ta;
@@ -374,7 +374,7 @@
 
        fclose(fp);
 
-       res= stat(str, &st);
+       stat(str, &st);
        ta->mtime= st.st_mtime;
        
        ta->nlines=0;
@@ -1236,14 +1236,11 @@
 {
        TextLine *tl, *startl;
        char *s= NULL;
-       int oldcl, oldsl;
 
        if (!text || !text->curl || !text->sell) return 0;
        
        txt_order_cursors(text);
 
-       oldcl= txt_get_span(text->lines.first, text->curl);
-       oldsl= txt_get_span(text->lines.first, text->sell);
        tl= startl= text->sell;
        
        if(match_case) s= strstr(&tl->line[text->selc], findstr);
@@ -2759,7 +2756,7 @@
                                break;
                        } else if (ch==':') {
                                is_indent = 1;
-                       } else if (ch==']' || ch=='}' || ch=='"' || ch=='\'') {
+                       } else if (ch!=' ' && ch!='\t') {
                                is_indent = 0;
                        }
                }

Modified: 
branches/soc-2011-onion/source/blender/python/generic/bpy_internal_import.c
===================================================================
--- branches/soc-2011-onion/source/blender/python/generic/bpy_internal_import.c 
2011-05-29 14:26:35 UTC (rev 37001)
+++ branches/soc-2011-onion/source/blender/python/generic/bpy_internal_import.c 
2011-05-29 14:38:15 UTC (rev 37002)
@@ -34,9 +34,6 @@
 #include <Python.h>
 #include <stddef.h>
 
-#include "compile.h"   /* for the PyCodeObject */
-#include "eval.h"              /* for PyEval_EvalCode */
-
 #include "bpy_internal_import.h"
 
 #include "MEM_guardedalloc.h"
@@ -51,7 +48,6 @@
  /* UNUSED */  
 #include "BKE_text.h" /* txt_to_buf */ 
 #include "BKE_main.h"
-#include "BKE_global.h" /* grr, only for G.main->name */
 
 static Main *bpy_import_main= NULL;
 
@@ -97,7 +93,7 @@
 /* returns a dummy filename for a textblock so we can tell what file a text 
block comes from */
 void bpy_text_filename_get(char *fn, size_t fn_len, Text *text)
 {
-       BLI_snprintf(fn, fn_len, "%s%c%s", text->id.lib ? 
text->id.lib->filepath : G.main->name, SEP, text->id.name+2);
+       BLI_snprintf(fn, fn_len, "%s%c%s", text->id.lib ? 
text->id.lib->filepath : bpy_import_main->name, SEP, text->id.name+2);
 }
 
 PyObject *bpy_text_import(Text *text)

Modified: branches/soc-2011-onion/source/blender/python/intern/bpy_rna.c
===================================================================
--- branches/soc-2011-onion/source/blender/python/intern/bpy_rna.c      
2011-05-29 14:26:35 UTC (rev 37001)
+++ branches/soc-2011-onion/source/blender/python/intern/bpy_rna.c      
2011-05-29 14:38:15 UTC (rev 37002)
@@ -5882,7 +5882,6 @@
        PyObject *py_class= (PyObject*)py_data;
        PyObject *base_class= RNA_struct_py_type_get(srna);
        PyObject *item;
-       PyObject *py_arg_count;
        int i, flag, arg_count, func_arg_count;
        const char *py_class_name= ((PyTypeObject *)py_class)->tp_name; // 
__name__
 
@@ -5945,9 +5944,7 @@
                        func_arg_count= rna_function_arg_count(func);
 
                        if (func_arg_count >= 0) { /* -1 if we dont care*/
-                               py_arg_count= 
PyObject_GetAttrString(PyFunction_GET_CODE(item), "co_argcount");
-                               arg_count= PyLong_AsLong(py_arg_count);
-                               Py_DECREF(py_arg_count);
+                               arg_count= ((PyCodeObject 
*)PyFunction_GET_CODE(item))->co_argcount;
 
                                /* note, the number of args we check for and 
the number of args we give to
                                 * @classmethods are different (quirk of 
python), this is why rna_function_arg_count() doesn't return the value -1*/

Modified: 
branches/soc-2011-onion/source/blender/render/intern/source/shadeinput.c
===================================================================
--- branches/soc-2011-onion/source/blender/render/intern/source/shadeinput.c    
2011-05-29 14:26:35 UTC (rev 37001)
+++ branches/soc-2011-onion/source/blender/render/intern/source/shadeinput.c    
2011-05-29 14:38:15 UTC (rev 37002)
@@ -633,14 +633,14 @@
                                dxco[0]= fx;
                                dxco[1]= 0.0f;
                                if(shi->facenor[2]!=0.0f)
-                                       dxco[2]= 
(shi->facenor[0]*fx)/shi->facenor[2];
+                                       dxco[2]= 
-(shi->facenor[0]*fx)/shi->facenor[2];
                                else 
                                        dxco[2]= 0.0f;
                                
                                dyco[0]= 0.0f;
                                dyco[1]= fy;
                                if(shi->facenor[2]!=0.0f)
-                                       dyco[2]= 
(shi->facenor[1]*fy)/shi->facenor[2];
+                                       dyco[2]= 
-(shi->facenor[1]*fy)/shi->facenor[2];
                                else 
                                        dyco[2]= 0.0f;
                                

Modified: branches/soc-2011-onion/source/gameengine/Expressions/PyObjectPlus.cpp
===================================================================
--- branches/soc-2011-onion/source/gameengine/Expressions/PyObjectPlus.cpp      
2011-05-29 14:26:35 UTC (rev 37001)
+++ branches/soc-2011-onion/source/gameengine/Expressions/PyObjectPlus.cpp      
2011-05-29 14:38:15 UTC (rev 37002)
@@ -1198,14 +1198,13 @@
                        f_lineno= PyObject_GetAttrString(frame, "f_lineno");
                        f_code= PyObject_GetAttrString(frame, "f_code");
                        if (f_lineno && f_code) {
-                               co_filename= PyObject_GetAttrString(f_code, 
"co_filename");
+                               co_filename= ((PyCodeObject 
*)f_code)->co_filename; /* borrow */
                                if (co_filename) {
 
                                        printf("\t%s:%d\n", 
_PyUnicode_AsString(co_filename), (int)PyLong_AsSsize_t(f_lineno));
 
                                        Py_DECREF(f_lineno);
                                        Py_DECREF(f_code);
-                                       Py_DECREF(co_filename);
                                        Py_DECREF(frame);
                                        return;
                                }

Modified: 
branches/soc-2011-onion/source/gameengine/GameLogic/SCA_PythonController.cpp
===================================================================
--- 
branches/soc-2011-onion/source/gameengine/GameLogic/SCA_PythonController.cpp    
    2011-05-29 14:26:35 UTC (rev 37001)
+++ 
branches/soc-2011-onion/source/gameengine/GameLogic/SCA_PythonController.cpp    
    2011-05-29 14:38:15 UTC (rev 37002)
@@ -357,14 +357,7 @@
        
        m_function_argc = 0; /* rare cases this could be a function that isnt 
defined in python, assume zero args */
        if (PyFunction_Check(m_function)) {
-               PyObject *py_arg_count = 
PyObject_GetAttrString(PyFunction_GET_CODE(m_function), "co_argcount");
-               if(py_arg_count) {
-                       m_function_argc = PyLong_AsLong(py_arg_count);
-                       Py_DECREF(py_arg_count);
-               }
-               else {
-                       PyErr_Clear(); /* unlikely to fail but just incase */
-               }
+               m_function_argc= ((PyCodeObject 
*)PyFunction_GET_CODE(m_function))->co_argcount;
        }
        
        if(m_function_argc > 1) {

Modified: 
branches/soc-2011-onion/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp

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