[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [39064] branches/soc-2011-carrot: Merge with trunk r39062
Miika Hamalainen
miika.hamalainen at kolumbus.fi
Fri Aug 5 11:39:49 CEST 2011
Revision: 39064
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39064
Author: miikah
Date: 2011-08-05 09:39:49 +0000 (Fri, 05 Aug 2011)
Log Message:
-----------
Merge with trunk r39062
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39062
Modified Paths:
--------------
branches/soc-2011-carrot/SConstruct
branches/soc-2011-carrot/doc/python_api/rst/bge.constraints.rst
branches/soc-2011-carrot/doc/python_api/rst/bge.texture.rst
branches/soc-2011-carrot/doc/python_api/rst/bgl.rst
branches/soc-2011-carrot/intern/ghost/intern/GHOST_NDOFManagerWin32.cpp
branches/soc-2011-carrot/intern/ghost/intern/GHOST_NDOFManagerWin32.h
branches/soc-2011-carrot/intern/ghost/intern/GHOST_SystemWin32.cpp
branches/soc-2011-carrot/release/scripts/startup/bl_ui/space_view3d_toolbar.py
branches/soc-2011-carrot/source/blender/blenloader/BLO_readfile.h
branches/soc-2011-carrot/source/blender/blenloader/intern/readfile.c
branches/soc-2011-carrot/source/blender/editors/curve/editfont.c
branches/soc-2011-carrot/source/blender/editors/include/UI_resources.h
branches/soc-2011-carrot/source/blender/editors/interface/resources.c
branches/soc-2011-carrot/source/blender/editors/space_file/file_ops.c
branches/soc-2011-carrot/source/blender/editors/space_node/drawnode.c
branches/soc-2011-carrot/source/blender/editors/space_sequencer/sequencer_edit.c
branches/soc-2011-carrot/source/blender/makesdna/DNA_space_types.h
branches/soc-2011-carrot/source/blender/makesdna/DNA_userdef_types.h
branches/soc-2011-carrot/source/blender/makesrna/intern/rna_access.c
branches/soc-2011-carrot/source/blender/makesrna/intern/rna_object_api.c
branches/soc-2011-carrot/source/blender/makesrna/intern/rna_userdef.c
branches/soc-2011-carrot/source/blender/python/intern/bpy_driver.c
branches/soc-2011-carrot/source/blender/python/intern/bpy_library.c
branches/soc-2011-carrot/source/blender/python/intern/bpy_operator.c
branches/soc-2011-carrot/source/blender/windowmanager/intern/wm_operators.c
branches/soc-2011-carrot/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
Property Changed:
----------------
branches/soc-2011-carrot/
branches/soc-2011-carrot/intern/audaspace/OpenAL/
Property changes on: branches/soc-2011-carrot
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk/blender:36828-39000
+ /trunk/blender:36828-39062
Modified: branches/soc-2011-carrot/SConstruct
===================================================================
--- branches/soc-2011-carrot/SConstruct 2011-08-05 09:31:35 UTC (rev 39063)
+++ branches/soc-2011-carrot/SConstruct 2011-08-05 09:39:49 UTC (rev 39064)
@@ -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-carrot/doc/python_api/rst/bge.constraints.rst
===================================================================
--- branches/soc-2011-carrot/doc/python_api/rst/bge.constraints.rst 2011-08-05 09:31:35 UTC (rev 39063)
+++ branches/soc-2011-carrot/doc/python_api/rst/bge.constraints.rst 2011-08-05 09:39:49 UTC (rev 39064)
@@ -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-carrot/doc/python_api/rst/bge.texture.rst
===================================================================
--- branches/soc-2011-carrot/doc/python_api/rst/bge.texture.rst 2011-08-05 09:31:35 UTC (rev 39063)
+++ branches/soc-2011-carrot/doc/python_api/rst/bge.texture.rst 2011-08-05 09:39:49 UTC (rev 39064)
@@ -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-carrot/doc/python_api/rst/bgl.rst
===================================================================
--- branches/soc-2011-carrot/doc/python_api/rst/bgl.rst 2011-08-05 09:31:35 UTC (rev 39063)
+++ branches/soc-2011-carrot/doc/python_api/rst/bgl.rst 2011-08-05 09:39:49 UTC (rev 39064)
@@ -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)
Property changes on: branches/soc-2011-carrot/intern/audaspace/OpenAL
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/soc-2011-pepper/intern/audaspace/OpenAL:38630
/trunk/blender/intern/audaspace/OpenAL:36828-38663
+ /branches/soc-2011-pepper/intern/audaspace/OpenAL:38630
/trunk/blender/intern/audaspace/OpenAL:36828-38663,39001-39062
Modified: branches/soc-2011-carrot/intern/ghost/intern/GHOST_NDOFManagerWin32.cpp
===================================================================
--- branches/soc-2011-carrot/intern/ghost/intern/GHOST_NDOFManagerWin32.cpp 2011-08-05 09:31:35 UTC (rev 39063)
+++ branches/soc-2011-carrot/intern/ghost/intern/GHOST_NDOFManagerWin32.cpp 2011-08-05 09:39:49 UTC (rev 39064)
@@ -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-carrot/intern/ghost/intern/GHOST_NDOFManagerWin32.h
===================================================================
--- branches/soc-2011-carrot/intern/ghost/intern/GHOST_NDOFManagerWin32.h 2011-08-05 09:31:35 UTC (rev 39063)
+++ branches/soc-2011-carrot/intern/ghost/intern/GHOST_NDOFManagerWin32.h 2011-08-05 09:39:49 UTC (rev 39064)
@@ -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-carrot/intern/ghost/intern/GHOST_SystemWin32.cpp
===================================================================
--- branches/soc-2011-carrot/intern/ghost/intern/GHOST_SystemWin32.cpp 2011-08-05 09:31:35 UTC (rev 39063)
+++ branches/soc-2011-carrot/intern/ghost/intern/GHOST_SystemWin32.cpp 2011-08-05 09:39:49 UTC (rev 39064)
@@ -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-carrot/release/scripts/startup/bl_ui/space_view3d_toolbar.py
===================================================================
--- branches/soc-2011-carrot/release/scripts/startup/bl_ui/space_view3d_toolbar.py 2011-08-05 09:31:35 UTC (rev 39063)
+++ branches/soc-2011-carrot/release/scripts/startup/bl_ui/space_view3d_toolbar.py 2011-08-05 09:39:49 UTC (rev 39064)
@@ -88,8 +88,9 @@
col = layout.column(align=True)
col.label(text="Shading:")
- col.operator("object.shade_smooth", text="Smooth")
- col.operator("object.shade_flat", text="Flat")
+ row = col.row(align=True)
+ row.operator("object.shade_smooth", text="Smooth")
+ row.operator("object.shade_flat", text="Flat")
draw_keyframing_tools(context, layout)
@@ -155,8 +156,9 @@
col = layout.column(align=True)
col.label(text="Shading:")
- col.operator("mesh.faces_shade_smooth", text="Smooth")
- col.operator("mesh.faces_shade_flat", text="Flat")
+ row = col.row(align=True)
+ row.operator("mesh.faces_shade_smooth", text="Smooth")
+ row.operator("mesh.faces_shade_flat", text="Flat")
draw_repeat_tools(context, layout)
Modified: branches/soc-2011-carrot/source/blender/blenloader/BLO_readfile.h
===================================================================
--- branches/soc-2011-carrot/source/blender/blenloader/BLO_readfile.h 2011-08-05 09:31:35 UTC (rev 39063)
+++ branches/soc-2011-carrot/source/blender/blenloader/BLO_readfile.h 2011-08-05 09:39:49 UTC (rev 39064)
@@ -211,9 +211,18 @@
*/
int BLO_is_a_library(const char *path, char *dir, char *group);
-struct Main* BLO_library_append_begin(const struct bContext *C, BlendHandle** bh, const char *filepath);
+/**
+ * Initialize the BlendHandle for appending or linking library data.
+ *
+ * @param mainvar The current main database eg G.main or CTX_data_main(C).
+ * @param bh A blender file handle as returned by BLO_blendhandle_from_file or BLO_blendhandle_from_memory.
+ * @param filepath Used for relative linking, copied to the lib->name
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list