Revision: 39029
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39029
Author:   nazgul
Date:     2011-08-04 16:52:26 +0000 (Thu, 04 Aug 2011)
Log Message:
-----------
Merging r38993 through r39028 from trunk into sox-2011-tomato

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

Modified Paths:
--------------
    branches/soc-2011-tomato/SConstruct
    branches/soc-2011-tomato/doc/python_api/rst/bge.constraints.rst
    branches/soc-2011-tomato/doc/python_api/rst/bge.texture.rst
    branches/soc-2011-tomato/doc/python_api/rst/bgl.rst
    branches/soc-2011-tomato/intern/ghost/intern/GHOST_NDOFManagerWin32.cpp
    branches/soc-2011-tomato/intern/ghost/intern/GHOST_NDOFManagerWin32.h
    branches/soc-2011-tomato/intern/ghost/intern/GHOST_SystemWin32.cpp
    
branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_userpref_keymap.py
    branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c
    branches/soc-2011-tomato/source/blender/editors/include/UI_resources.h
    branches/soc-2011-tomato/source/blender/editors/interface/resources.c
    branches/soc-2011-tomato/source/blender/editors/space_node/drawnode.c
    branches/soc-2011-tomato/source/blender/makesdna/DNA_space_types.h
    branches/soc-2011-tomato/source/blender/makesdna/DNA_userdef_types.h
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_object_api.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_userdef.c
    branches/soc-2011-tomato/source/blender/python/intern/bpy_driver.c
    branches/soc-2011-tomato/source/blender/python/intern/bpy_operator.c

Property Changed:
----------------
    branches/soc-2011-tomato/
    branches/soc-2011-tomato/source/tools/MakeGLStipple.py


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

Modified: branches/soc-2011-tomato/SConstruct
===================================================================
--- branches/soc-2011-tomato/SConstruct 2011-08-04 16:07:24 UTC (rev 39028)
+++ branches/soc-2011-tomato/SConstruct 2011-08-04 16:52:26 UTC (rev 39029)
@@ -253,7 +253,16 @@
         if k not in B.arguments:
             env[k] = v
 
+# detect presence of 3D_CONNEXION_CLIENT_LIBRARY for OSX
+if env['OURPLATFORM']=='darwin':
+    envi = Environment()
+    conf = Configure(envi)
+    if not conf.CheckCHeader('ConnexionClientAPI.h'): # CheckCXXHeader if it 
is c++ !
+        print "3D_CONNEXION_CLIENT_LIBRARY not found, disabling 
WITH_BF_3DMOUSE" # avoid build errors !
+        env['WITH_BF_3DMOUSE'] = 0
+    envi = conf.Finish()
 
+
 if env['WITH_BF_OPENMP'] == 1:
         if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
                 env['CCFLAGS'].append('/openmp')

Modified: branches/soc-2011-tomato/doc/python_api/rst/bge.constraints.rst
===================================================================
--- branches/soc-2011-tomato/doc/python_api/rst/bge.constraints.rst     
2011-08-04 16:07:24 UTC (rev 39028)
+++ branches/soc-2011-tomato/doc/python_api/rst/bge.constraints.rst     
2011-08-04 16:52:26 UTC (rev 39029)
@@ -2,6 +2,10 @@
 Physics Constraints (bge.constraints)
 =====================================
 
+.. module:: bge.constraints
+
+.. literalinclude:: ../examples/bge.constraints.py
+
 .. function:: createConstraint(physicsid, physicsid2, constrainttype, [pivotX, 
pivotY, pivotZ, [axisX, axisY, axisZ, [flag]]]])
 
    Creates a constraint.

Modified: branches/soc-2011-tomato/doc/python_api/rst/bge.texture.rst
===================================================================
--- branches/soc-2011-tomato/doc/python_api/rst/bge.texture.rst 2011-08-04 
16:07:24 UTC (rev 39028)
+++ branches/soc-2011-tomato/doc/python_api/rst/bge.texture.rst 2011-08-04 
16:52:26 UTC (rev 39029)
@@ -36,6 +36,10 @@
 
 .. module:: bge.texture
 
+.. literalinclude:: ../examples/bge.texture.py
+
+.. literalinclude:: ../examples/bge.texture.1.py
+
 .. class:: VideoFFmpeg(file [, capture=-1, rate=25.0, width=0, height=0])
 
    FFmpeg video source

Modified: branches/soc-2011-tomato/doc/python_api/rst/bgl.rst
===================================================================
--- branches/soc-2011-tomato/doc/python_api/rst/bgl.rst 2011-08-04 16:07:24 UTC 
(rev 39028)
+++ branches/soc-2011-tomato/doc/python_api/rst/bgl.rst 2011-08-04 16:52:26 UTC 
(rev 39029)
@@ -15,7 +15,7 @@
 The "red book": "I{OpenGL Programming Guide: The Official Guide to Learning
 OpenGL}" and the online NeHe tutorials are two of the best resources.
 
-..note::
+.. note::
    You can use the :class:`Image` type to load and set textures.
    See :class:`Image.gl_load` and :class:`Image.gl_load`,
    for example.
@@ -1386,7 +1386,7 @@
         bgl.glGetFloatv(bgl.GL_MODELVIEW_MATRIX, view_matrix)
         f = 1.0 / view_matrix[0]
 
-               # Instead of the usual glRasterPos2i(xval, yval)
+        # Instead of the usual glRasterPos2i(xval, yval)
         bgl.glRasterPos2f(xval * f, yval * f)
 
 
@@ -1848,10 +1848,13 @@
    .. code-block:: python
 
       import bgl
+
       myByteBuffer = bgl.Buffer(bgl.GL_BYTE, [32, 32])
       bgl.glGetPolygonStipple(myByteBuffer)
+
       print(myByteBuffer.dimensions)
       print(myByteBuffer.to_list())
+
       sliceBuffer = myByteBuffer[0:16]
       print(sliceBuffer)
 

Modified: 
branches/soc-2011-tomato/intern/ghost/intern/GHOST_NDOFManagerWin32.cpp
===================================================================
--- branches/soc-2011-tomato/intern/ghost/intern/GHOST_NDOFManagerWin32.cpp     
2011-08-04 16:07:24 UTC (rev 39028)
+++ branches/soc-2011-tomato/intern/ghost/intern/GHOST_NDOFManagerWin32.cpp     
2011-08-04 16:52:26 UTC (rev 39029)
@@ -22,7 +22,9 @@
  *
  * ***** END GPL LICENSE BLOCK *****
  */
- 
+
+#ifdef WITH_INPUT_NDOF // use contents of this file
+
 #include "GHOST_NDOFManagerWin32.h"
 
 
@@ -39,3 +41,5 @@
        // always available since RawInput is built into Windows
        return true;
 }
+
+#endif // WITH_INPUT_NDOF

Modified: branches/soc-2011-tomato/intern/ghost/intern/GHOST_NDOFManagerWin32.h
===================================================================
--- branches/soc-2011-tomato/intern/ghost/intern/GHOST_NDOFManagerWin32.h       
2011-08-04 16:07:24 UTC (rev 39028)
+++ branches/soc-2011-tomato/intern/ghost/intern/GHOST_NDOFManagerWin32.h       
2011-08-04 16:52:26 UTC (rev 39029)
@@ -22,10 +22,13 @@
  *
  * ***** END GPL LICENSE BLOCK *****
  */
- 
+
+
 #ifndef _GHOST_NDOFMANAGERWIN32_H_
 #define _GHOST_NDOFMANAGERWIN32_H_
 
+#ifdef WITH_INPUT_NDOF
+
 #include "GHOST_NDOFManager.h"
 
 
@@ -37,4 +40,5 @@
 };
 
 
-#endif
+#endif // WITH_INPUT_NDOF
+#endif // #include guard

Modified: branches/soc-2011-tomato/intern/ghost/intern/GHOST_SystemWin32.cpp
===================================================================
--- branches/soc-2011-tomato/intern/ghost/intern/GHOST_SystemWin32.cpp  
2011-08-04 16:07:24 UTC (rev 39028)
+++ branches/soc-2011-tomato/intern/ghost/intern/GHOST_SystemWin32.cpp  
2011-08-04 16:52:26 UTC (rev 39029)
@@ -62,7 +62,6 @@
 #endif
 #endif
 
-#include "GHOST_Debug.h"
 #include "GHOST_DisplayManagerWin32.h"
 #include "GHOST_EventButton.h"
 #include "GHOST_EventCursor.h"
@@ -72,7 +71,10 @@
 #include "GHOST_TimerManager.h"
 #include "GHOST_WindowManager.h"
 #include "GHOST_WindowWin32.h"
+
+#ifdef WITH_INPUT_NDOF
 #include "GHOST_NDOFManagerWin32.h"
+#endif
 
 // Key code values not found in winuser.h
 #ifndef VK_MINUS
@@ -127,22 +129,32 @@
 
 static void initRawInput()
 {
-       RAWINPUTDEVICE devices[2];
-       memset(devices, 0, 2 * sizeof(RAWINPUTDEVICE));
+#ifdef WITH_INPUT_NDOF
+#define DEVICE_COUNT 2
+#else
+#define DEVICE_COUNT 1
+#endif
 
-       // multi-axis mouse (SpaceNavigator, etc.)
-       devices[0].usUsagePage = 0x01;
-       devices[0].usUsage = 0x08;
+       RAWINPUTDEVICE devices[DEVICE_COUNT];
+       memset(devices, 0, DEVICE_COUNT * sizeof(RAWINPUTDEVICE));
 
        // Initiates WM_INPUT messages from keyboard
        // That way GHOST can retrieve true keys
+       devices[0].usUsagePage = 0x01;
+       devices[0].usUsage = 0x06; /* 
http://msdn.microsoft.com/en-us/windows/hardware/gg487473.aspx */
+
+#ifdef WITH_INPUT_NDOF
+       // multi-axis mouse (SpaceNavigator, etc.)
        devices[1].usUsagePage = 0x01;
-       devices[1].usUsage = 0x06; /* 
http://msdn.microsoft.com/en-us/windows/hardware/gg487473.aspx */
+       devices[1].usUsage = 0x08;
+#endif
 
-       if (RegisterRawInputDevices(devices, 2, sizeof(RAWINPUTDEVICE)))
-               puts("registered for RawInput (spacenav & keyboard)");
+       if (RegisterRawInputDevices(devices, DEVICE_COUNT, 
sizeof(RAWINPUTDEVICE)))
+               ; // yay!
        else
                printf("could not register for RawInput: %d\n", 
(int)GetLastError());
+
+#undef DEVICE_COUNT
 }
 
 GHOST_SystemWin32::GHOST_SystemWin32()
@@ -808,6 +820,7 @@
                case 1: // translation
                {
                        short* axis = (short*)(data + 1);
+                       // massage into blender view coords (same goes for 
rotation)
                        short t[3] = {axis[0], -axis[2], axis[1]};
                        m_ndofManager->updateTranslation(t, now);
 
@@ -830,14 +843,6 @@
                }
                case 3: // buttons
                {
-#if 0
-                       // I'm getting garbage bits -- examine whole report:
-                       printf("ndof: HID report for buttons [");
-                       for (int i = 0; i < raw.data.hid.dwSizeHid; ++i)
-                               printf(" %02X", data[i]);
-                       printf(" ]\n");
-#endif
-
                        int button_bits;
                        memcpy(&button_bits, data + 1, sizeof(button_bits));
                        m_ndofManager->updateButtons(button_bits, now);
@@ -892,12 +897,12 @@
                                                        GHOST_PRINT(" key 
ignored\n")
                                                }
                                                break;
+#ifdef WITH_INPUT_NDOF
                                        case RIM_TYPEHID:
-#ifdef WITH_INPUT_NDOF
                                                if (system->processNDOF(raw))
                                                        eventHandled = true;
+                                               break;
 #endif
-                                               break;
                                        }
                                break;
                                }

Modified: 
branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_userpref_keymap.py
===================================================================
--- 
branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_userpref_keymap.py 
    2011-08-04 16:07:24 UTC (rev 39028)
+++ 
branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_userpref_keymap.py 
    2011-08-04 16:52:26 UTC (rev 39029)
@@ -595,6 +595,9 @@
         if not self.filepath:
             raise Exception("Filepath not set")
 
+        if not self.filepath.endswith('.py'):
+            self.filepath += '.py'
+
         f = open(self.filepath, "w")
         if not f:
             raise Exception("Could not open file")

Modified: branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c        
2011-08-04 16:07:24 UTC (rev 39028)
+++ branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c        
2011-08-04 16:52:26 UTC (rev 39029)
@@ -13150,58 +13150,11 @@
        return library_append_begin(C, &fd, filepath);
 }
 
-static void append_do_cursor(Scene *scene, Library *curlib, short flag)
-{
-       Base *centerbase;
-       Object *ob;
-       float *curs, centerloc[3], vec[3], min[3], max[3];
-       int count= 0;
 
-       /* when not linking (appending)... */
-       if(flag & FILE_LINK) 
-               return;
-
-       /* we're not appending at cursor */
-       if((flag & FILE_ATCURSOR) == 0) 
-               return;
-       
-       /* find the center of everything appended */
-       INIT_MINMAX(min, max);
-       centerbase= (scene->base.first);
-       while(centerbase) {
-               if(centerbase->object->id.lib==curlib && 
centerbase->object->parent==NULL) {
-                       VECCOPY(vec, centerbase->object->loc);
-                       DO_MINMAX(vec, min, max);
-                       count++;
-               }
-               centerbase= centerbase->next;
-       }
-       /* we haven't found any objects to move to cursor */
-       if(!count) 
-               return;
-       
-       /* move from the center of the appended objects to cursor */
-       mid_v3_v3v3(centerloc, min, max);
-       curs = scene->cursor;
-       VECSUB(centerloc,curs,centerloc);
-       
-       /* now translate the center of the objects */
-       centerbase= (scene->base.first);
-       while(centerbase) {
-               if(centerbase->object->id.lib==curlib && 
centerbase->object->parent==NULL) {
-                       ob= centerbase->object;
-                       ob->loc[0] += centerloc[0];
-                       ob->loc[1] += centerloc[1];
-                       ob->loc[2] += centerloc[2];
-               }
-               centerbase= centerbase->next;
-       }
-}
-
+/* Context == NULL signifies not to do any scene manipulation */
 static void library_append_end(const bContext *C, Main *mainl, FileData **fd, 
int idcode, short flag)
 {
        Main *mainvar;

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