[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42865] branches/vgroup_modifiers: Merged from trunk (-r42849:42864)

Bastien Montagne montagne29 at wanadoo.fr
Sat Dec 24 15:35:18 CET 2011


Revision: 42865
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=42865
Author:   mont29
Date:     2011-12-24 14:35:14 +0000 (Sat, 24 Dec 2011)
Log Message:
-----------
Merged from trunk (-r42849:42864)

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

Modified Paths:
--------------
    branches/vgroup_modifiers/CMakeLists.txt
    branches/vgroup_modifiers/intern/cycles/blender/addon/engine.py
    branches/vgroup_modifiers/intern/cycles/blender/blender_python.cpp
    branches/vgroup_modifiers/intern/ghost/GHOST_C-api.h
    branches/vgroup_modifiers/intern/ghost/GHOST_ISystem.h
    branches/vgroup_modifiers/intern/ghost/GHOST_IWindow.h
    branches/vgroup_modifiers/intern/ghost/intern/GHOST_C-api.cpp
    branches/vgroup_modifiers/intern/ghost/intern/GHOST_CallbackEventConsumer.cpp
    branches/vgroup_modifiers/intern/ghost/intern/GHOST_Debug.h
    branches/vgroup_modifiers/intern/ghost/intern/GHOST_DisplayManager.h
    branches/vgroup_modifiers/intern/ghost/intern/GHOST_EventDragnDrop.h
    branches/vgroup_modifiers/intern/ghost/intern/GHOST_EventKey.h
    branches/vgroup_modifiers/intern/ghost/intern/GHOST_EventNDOF.h
    branches/vgroup_modifiers/intern/ghost/intern/GHOST_EventTrackpad.h
    branches/vgroup_modifiers/intern/ghost/intern/GHOST_System.cpp
    branches/vgroup_modifiers/intern/ghost/intern/GHOST_System.h
    branches/vgroup_modifiers/intern/ghost/intern/GHOST_SystemCocoa.h
    branches/vgroup_modifiers/intern/ghost/intern/GHOST_SystemX11.cpp
    branches/vgroup_modifiers/intern/ghost/intern/GHOST_TimerTask.h
    branches/vgroup_modifiers/intern/ghost/intern/GHOST_Window.cpp
    branches/vgroup_modifiers/intern/ghost/intern/GHOST_Window.h
    branches/vgroup_modifiers/intern/ghost/intern/GHOST_WindowWin32.cpp
    branches/vgroup_modifiers/intern/ghost/intern/GHOST_WindowWin32.h
    branches/vgroup_modifiers/intern/ghost/intern/GHOST_WindowX11.cpp
    branches/vgroup_modifiers/intern/guardedalloc/MEM_sys_types.h
    branches/vgroup_modifiers/release/scripts/modules/bpy_extras/view3d_utils.py
    branches/vgroup_modifiers/source/blender/blenkernel/BKE_customdata.h
    branches/vgroup_modifiers/source/blender/blenkernel/BKE_writeffmpeg.h
    branches/vgroup_modifiers/source/blender/blenkernel/depsgraph_private.h
    branches/vgroup_modifiers/source/blender/blenkernel/intern/object.c
    branches/vgroup_modifiers/source/blender/blenkernel/intern/writeavi.c
    branches/vgroup_modifiers/source/blender/blenkernel/intern/writeffmpeg.c
    branches/vgroup_modifiers/source/blender/blenloader/BLO_sys_types.h
    branches/vgroup_modifiers/source/blender/editors/include/ED_view3d.h
    branches/vgroup_modifiers/source/blender/editors/interface/view2d.c
    branches/vgroup_modifiers/source/blender/editors/sculpt_paint/paint_stroke.c
    branches/vgroup_modifiers/source/blender/makesdna/DNA_object_types.h
    branches/vgroup_modifiers/source/blender/makesdna/DNA_scene_types.h
    branches/vgroup_modifiers/source/blender/makesdna/intern/dna_genfile.c
    branches/vgroup_modifiers/source/blender/makesdna/intern/makesdna.c
    branches/vgroup_modifiers/source/blender/makesrna/intern/rna_scene.c
    branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_decimate.c
    branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_edgesplit.c
    branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_smooth.c
    branches/vgroup_modifiers/source/blender/modifiers/intern/MOD_solidify.c
    branches/vgroup_modifiers/source/blender/python/generic/bpy_internal_import.c
    branches/vgroup_modifiers/source/blender/python/intern/bpy_interface.c
    branches/vgroup_modifiers/source/blender/python/mathutils/mathutils.c
    branches/vgroup_modifiers/source/blender/python/mathutils/mathutils.h
    branches/vgroup_modifiers/source/blender/python/mathutils/mathutils_Color.c
    branches/vgroup_modifiers/source/blender/python/mathutils/mathutils_Euler.c
    branches/vgroup_modifiers/source/blender/python/mathutils/mathutils_Euler.h
    branches/vgroup_modifiers/source/blender/python/mathutils/mathutils_Matrix.c
    branches/vgroup_modifiers/source/blender/python/mathutils/mathutils_Matrix.h
    branches/vgroup_modifiers/source/blender/python/mathutils/mathutils_Quaternion.c
    branches/vgroup_modifiers/source/blender/python/mathutils/mathutils_Vector.c
    branches/vgroup_modifiers/source/blender/python/mathutils/mathutils_geometry.c
    branches/vgroup_modifiers/source/blender/python/mathutils/mathutils_noise.c
    branches/vgroup_modifiers/source/blender/quicktime/apple/qtkit_export.m
    branches/vgroup_modifiers/source/blender/quicktime/apple/quicktime_export.c
    branches/vgroup_modifiers/source/blender/quicktime/quicktime_export.h
    branches/vgroup_modifiers/source/blender/windowmanager/intern/wm_event_system.c

Property Changed:
----------------
    branches/vgroup_modifiers/
    branches/vgroup_modifiers/source/blender/editors/space_outliner/


Property changes on: branches/vgroup_modifiers
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/soc-2011-cucumber:37517
/branches/soc-2011-tomato:42376,42378-42379,42397,42400
/trunk/blender:38694-38739,38741-39198,39200-39651,39653-39988,39990-42849
   + /branches/soc-2011-cucumber:37517
/branches/soc-2011-tomato:42376,42378-42379,42397,42400
/trunk/blender:38694-38739,38741-39198,39200-39651,39653-39988,39990-42864

Modified: branches/vgroup_modifiers/CMakeLists.txt
===================================================================
--- branches/vgroup_modifiers/CMakeLists.txt	2011-12-24 14:22:16 UTC (rev 42864)
+++ branches/vgroup_modifiers/CMakeLists.txt	2011-12-24 14:35:14 UTC (rev 42865)
@@ -287,18 +287,6 @@
 							"because it is currently unsupported, remove this "
 							"line if youre a developer who wants to add support.")
 	endif()
-
-	if(WITH_CYCLES)
-		message(FATAL_ERROR "MINGW requires WITH_CYCLES to be OFF "
-							"because it is currently unsupported, remove this "
-							"line if youre a developer who wants to add support.")
-	endif()
-
-	if(WITH_IMAGE_OPENEXR)
-		message(FATAL_ERROR "MINGW requires WITH_IMAGE_OPENEXR to be OFF "
-							"because it is currently unsupported, remove this "
-							"line if youre a developer who wants to add support.")
-	endif()
 endif()
 
 if(NOT WITH_FFTW3 AND WITH_MOD_OCEANSIM)

Modified: branches/vgroup_modifiers/intern/cycles/blender/addon/engine.py
===================================================================
--- branches/vgroup_modifiers/intern/cycles/blender/addon/engine.py	2011-12-24 14:22:16 UTC (rev 42864)
+++ branches/vgroup_modifiers/intern/cycles/blender/addon/engine.py	2011-12-24 14:35:14 UTC (rev 42865)
@@ -22,17 +22,17 @@
 
 
 def init():
-    import bcycles
+    import _cycles
     import os.path
 
     path = os.path.dirname(__file__)
     user_path = os.path.dirname(os.path.abspath(bpy.utils.user_resource('CONFIG', '')))
 
-    bcycles.init(path, user_path)
+    _cycles.init(path, user_path)
 
 
 def create(engine, data, scene, region=0, v3d=0, rv3d=0):
-    import bcycles
+    import _cycles
 
     data = data.as_pointer()
     scene = scene.as_pointer()
@@ -43,42 +43,42 @@
     if rv3d:
         rv3d = rv3d.as_pointer()
 
-    engine.session = bcycles.create(engine.as_pointer(), data, scene, region, v3d, rv3d)
+    engine.session = _cycles.create(engine.as_pointer(), data, scene, region, v3d, rv3d)
 
 
 def free(engine):
     if hasattr(engine, "session"):
         if engine.session:
-            import bcycles
-            bcycles.free(engine.session)
+            import _cycles
+            _cycles.free(engine.session)
         del engine.session
 
 
 def render(engine):
-    import bcycles
+    import _cycles
     if hasattr(engine, "session"):
-        bcycles.render(engine.session)
+        _cycles.render(engine.session)
 
 
 def update(engine, data, scene):
-    import bcycles
-    bcycles.sync(engine.session)
+    import _cycles
+    _cycles.sync(engine.session)
 
 
 def draw(engine, region, v3d, rv3d):
-    import bcycles
+    import _cycles
     v3d = v3d.as_pointer()
     rv3d = rv3d.as_pointer()
 
     # draw render image
-    bcycles.draw(engine.session, v3d, rv3d)
+    _cycles.draw(engine.session, v3d, rv3d)
 
 
 def available_devices():
-    import bcycles
-    return bcycles.available_devices()
+    import _cycles
+    return _cycles.available_devices()
 
 
 def with_osl():
-    import bcycles
-    return bcycles.with_osl()
+    import _cycles
+    return _cycles.with_osl

Modified: branches/vgroup_modifiers/intern/cycles/blender/blender_python.cpp
===================================================================
--- branches/vgroup_modifiers/intern/cycles/blender/blender_python.cpp	2011-12-24 14:22:16 UTC (rev 42864)
+++ branches/vgroup_modifiers/intern/cycles/blender/blender_python.cpp	2011-12-24 14:35:14 UTC (rev 42865)
@@ -35,8 +35,7 @@
 	
 	path_init(path, user_path);
 
-	Py_INCREF(Py_None);
-	return Py_None;
+	Py_RETURN_NONE;
 }
 
 static PyObject *create_func(PyObject *self, PyObject *args)
@@ -89,35 +88,23 @@
 	return PyLong_FromVoidPtr(session);
 }
 
-static PyObject *free_func(PyObject *self, PyObject *args)
+static PyObject *free_func(PyObject *self, PyObject *value)
 {
-	PyObject *pysession;
+	delete (BlenderSession*)PyLong_AsVoidPtr(value);
 
-	if(!PyArg_ParseTuple(args, "O", &pysession))
-		return NULL;
-
-	delete (BlenderSession*)PyLong_AsVoidPtr(pysession);
-
-	Py_INCREF(Py_None);
-	return Py_None;
+	Py_RETURN_NONE;
 }
 
-static PyObject *render_func(PyObject *self, PyObject *args)
+static PyObject *render_func(PyObject *self, PyObject *value)
 {
-	PyObject *pysession;
-
-	if(!PyArg_ParseTuple(args, "O", &pysession))
-		return NULL;
-	
 	Py_BEGIN_ALLOW_THREADS
 
-	BlenderSession *session = (BlenderSession*)PyLong_AsVoidPtr(pysession);
+	BlenderSession *session = (BlenderSession*)PyLong_AsVoidPtr(value);
 	session->render();
 
 	Py_END_ALLOW_THREADS
 
-	Py_INCREF(Py_None);
-	return Py_None;
+	Py_RETURN_NONE;
 }
 
 static PyObject *draw_func(PyObject *self, PyObject *args)
@@ -137,22 +124,15 @@
 		session->draw(viewport[2], viewport[3]);
 	}
 
-	Py_INCREF(Py_None);
-	return Py_None;
+	Py_RETURN_NONE;
 }
 
-static PyObject *sync_func(PyObject *self, PyObject *args)
+static PyObject *sync_func(PyObject *self, PyObject *value)
 {
-	PyObject *pysession;
-
-	if(!PyArg_ParseTuple(args, "O", &pysession))
-		return NULL;
-
-	BlenderSession *session = (BlenderSession*)PyLong_AsVoidPtr(pysession);
+	BlenderSession *session = (BlenderSession*)PyLong_AsVoidPtr(value);
 	session->synchronize();
 
-	Py_INCREF(Py_None);
-	return Py_None;
+	Py_RETURN_NONE;
 }
 
 static PyObject *available_devices_func(PyObject *self, PyObject *args)
@@ -163,38 +143,26 @@
 
 	for(size_t i = 0; i < types.size(); i++) {
 		string name = Device::string_from_type(types[i]);
-		PyTuple_SetItem(ret, i, PyUnicode_FromString(name.c_str()));
+		PyTuple_SET_ITEM(ret, i, PyUnicode_FromString(name.c_str()));
 	}
 
 	return ret;
 }
 
-static PyObject *with_osl_func(PyObject *self, PyObject *args)
-{
-#ifdef WITH_OSL
-	PyObject *ret = Py_True;
-#else
-	PyObject *ret = Py_False;
-#endif
-
-	return Py_INCREF(ret), ret;
-}
-
 static PyMethodDef methods[] = {
 	{"init", init_func, METH_VARARGS, ""},
 	{"create", create_func, METH_VARARGS, ""},
-	{"free", free_func, METH_VARARGS, ""},
-	{"render", render_func, METH_VARARGS, ""},
+	{"free", free_func, METH_O, ""},
+	{"render", render_func, METH_O, ""},
 	{"draw", draw_func, METH_VARARGS, ""},
-	{"sync", sync_func, METH_VARARGS, ""},
+	{"sync", sync_func, METH_O, ""},
 	{"available_devices", available_devices_func, METH_NOARGS, ""},
-	{"with_osl", with_osl_func, METH_NOARGS, ""},
 	{NULL, NULL, 0, NULL},
 };
 
 static struct PyModuleDef module = {
 	PyModuleDef_HEAD_INIT,
-	"bcycles",
+	"_cycles",
 	"Blender cycles render integration",
 	-1,
 	methods,
@@ -207,6 +175,16 @@
 
 PyObject *CYCLES_initPython()
 {
-	return PyModule_Create(&ccl::module);
+	PyObject *mod= PyModule_Create(&ccl::module);
+
+#ifdef WITH_OSL
+	PyModule_AddObject(mod, "with_osl", Py_True);
+	Py_INCREF(Py_True);
+#else
+	PyModule_AddObject(mod, "with_osl", Py_False);
+	Py_INCREF(Py_False);
+#endif
+
+	return mod;
 }
 

Modified: branches/vgroup_modifiers/intern/ghost/GHOST_C-api.h
===================================================================
--- branches/vgroup_modifiers/intern/ghost/GHOST_C-api.h	2011-12-24 14:22:16 UTC (rev 42864)
+++ branches/vgroup_modifiers/intern/ghost/GHOST_C-api.h	2011-12-24 14:35:14 UTC (rev 42865)
@@ -81,7 +81,8 @@
  * @param eventCallback The event callback routine.
  * @param userdata		Pointer to user data returned to the callback routine.
  */
-extern GHOST_EventConsumerHandle GHOST_CreateEventConsumer(GHOST_EventCallbackProcPtr eventCallback, GHOST_TUserDataPtr userdata);
+extern GHOST_EventConsumerHandle GHOST_CreateEventConsumer(GHOST_EventCallbackProcPtr eventCallback,
+                                                           GHOST_TUserDataPtr userdata);
 
 /**
  * Disposes an event consumer object

Modified: branches/vgroup_modifiers/intern/ghost/GHOST_ISystem.h
===================================================================
--- branches/vgroup_modifiers/intern/ghost/GHOST_ISystem.h	2011-12-24 14:22:16 UTC (rev 42864)
+++ branches/vgroup_modifiers/intern/ghost/GHOST_ISystem.h	2011-12-24 14:35:14 UTC (rev 42865)
@@ -181,7 +181,10 @@
 	 * @param userData	Placeholder for user data.
 	 * @return A timer task (0 if timer task installation failed).
 	 */
-	virtual GHOST_ITimerTask* installTimer(GHOST_TUns64 delay, GHOST_TUns64 interval, GHOST_TimerProcPtr timerProc, GHOST_TUserDataPtr userData = 0) = 0;
+	virtual GHOST_ITimerTask* installTimer(GHOST_TUns64 delay,
+	                                       GHOST_TUns64 interval,
+	                                       GHOST_TimerProcPtr timerProc,
+	                                       GHOST_TUserDataPtr userData = 0) = 0;
 
 	/**
 	 * Removes a timer.

Modified: branches/vgroup_modifiers/intern/ghost/GHOST_IWindow.h
===================================================================
--- branches/vgroup_modifiers/intern/ghost/GHOST_IWindow.h	2011-12-24 14:22:16 UTC (rev 42864)
+++ branches/vgroup_modifiers/intern/ghost/GHOST_IWindow.h	2011-12-24 14:35:14 UTC (rev 42865)
@@ -303,7 +303,7 @@
 	 * @param	grab The new grab state of the cursor.
 	 * @return	Indication of success.
 	 */
-	virtual GHOST_TSuccess setCursorGrab(GHOST_TGrabCursorMode mode, GHOST_Rect *bounds) { return GHOST_kSuccess; };
+	virtual GHOST_TSuccess setCursorGrab(GHOST_TGrabCursorMode mode, GHOST_Rect *bounds) { return GHOST_kSuccess; }
 
 #ifdef WITH_CXX_GUARDEDALLOC
 public:

Modified: branches/vgroup_modifiers/intern/ghost/intern/GHOST_C-api.cpp
===================================================================
--- branches/vgroup_modifiers/intern/ghost/intern/GHOST_C-api.cpp	2011-12-24 14:22:16 UTC (rev 42864)
+++ branches/vgroup_modifiers/intern/ghost/intern/GHOST_C-api.cpp	2011-12-24 14:35:14 UTC (rev 42865)
@@ -65,7 +65,8 @@
 }
 
 
-GHOST_EventConsumerHandle GHOST_CreateEventConsumer(GHOST_EventCallbackProcPtr eventCallback, GHOST_TUserDataPtr userdata)
+GHOST_EventConsumerHandle GHOST_CreateEventConsumer(GHOST_EventCallbackProcPtr eventCallback,
+                                                    GHOST_TUserDataPtr userdata)
 {
 	return (GHOST_EventConsumerHandle) new GHOST_CallbackEventConsumer (eventCallback, userdata);
 }


@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list