[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [50573] branches/soc-2011-tomato: Merging r50522 through r50572 from trunk into soc-2011-tomato

Sergey Sharybin sergey.vfx at gmail.com
Thu Sep 13 13:13:13 CEST 2012


Revision: 50573
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50573
Author:   nazgul
Date:     2012-09-13 11:13:13 +0000 (Thu, 13 Sep 2012)
Log Message:
-----------
Merging r50522 through r50572 from trunk into soc-2011-tomato

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

Modified Paths:
--------------
    branches/soc-2011-tomato/build_files/cmake/macros.cmake
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/SConscript
    branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/collections_port.h
    branches/soc-2011-tomato/intern/cycles/blender/addon/ui.py
    branches/soc-2011-tomato/intern/cycles/blender/blender_session.cpp
    branches/soc-2011-tomato/intern/cycles/device/device.h
    branches/soc-2011-tomato/intern/cycles/device/device_cpu.cpp
    branches/soc-2011-tomato/intern/cycles/device/device_cuda.cpp
    branches/soc-2011-tomato/intern/cycles/device/device_multi.cpp
    branches/soc-2011-tomato/intern/cycles/device/device_opencl.cpp
    branches/soc-2011-tomato/intern/cycles/render/session.cpp
    branches/soc-2011-tomato/intern/cycles/render/session.h
    branches/soc-2011-tomato/intern/cycles/util/util_opencl.cpp
    branches/soc-2011-tomato/intern/cycles/util/util_task.cpp
    branches/soc-2011-tomato/release/scripts/startup/bl_operators/screen_play_rendered_anim.py
    branches/soc-2011-tomato/release/scripts/startup/bl_operators/wm.py
    branches/soc-2011-tomato/source/blender/blenkernel/BKE_anim.h
    branches/soc-2011-tomato/source/blender/blenkernel/BKE_image.h
    branches/soc-2011-tomato/source/blender/blenkernel/BKE_mask.h
    branches/soc-2011-tomato/source/blender/blenkernel/BKE_movieclip.h
    branches/soc-2011-tomato/source/blender/blenkernel/BKE_sequencer.h
    branches/soc-2011-tomato/source/blender/blenkernel/intern/action.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/anim.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/fcurve.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/image.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/key.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/mask_rasterize.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/movieclip.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/object.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/pointcache.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/sequencer.c
    branches/soc-2011-tomato/source/blender/blenlib/intern/math_geom.c
    branches/soc-2011-tomato/source/blender/bmesh/intern/bmesh_core.c
    branches/soc-2011-tomato/source/blender/bmesh/intern/bmesh_iterators.c
    branches/soc-2011-tomato/source/blender/bmesh/intern/bmesh_private.h
    branches/soc-2011-tomato/source/blender/bmesh/intern/bmesh_structure.c
    branches/soc-2011-tomato/source/blender/bmesh/operators/bmo_connect.c
    branches/soc-2011-tomato/source/blender/collada/DocumentExporter.cpp
    branches/soc-2011-tomato/source/blender/collada/GeometryExporter.cpp
    branches/soc-2011-tomato/source/blender/collada/ImageExporter.cpp
    branches/soc-2011-tomato/source/blender/compositor/intern/COM_NodeOperation.cpp
    branches/soc-2011-tomato/source/blender/compositor/operations/COM_CombineChannelsOperation.cpp
    branches/soc-2011-tomato/source/blender/compositor/operations/COM_CombineChannelsOperation.h
    branches/soc-2011-tomato/source/blender/editors/animation/anim_markers.c
    branches/soc-2011-tomato/source/blender/editors/include/ED_image.h
    branches/soc-2011-tomato/source/blender/editors/include/ED_mask.h
    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_intern.h
    branches/soc-2011-tomato/source/blender/editors/interface/interface_regions.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface_utils.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface_widgets.c
    branches/soc-2011-tomato/source/blender/editors/mask/mask_add.c
    branches/soc-2011-tomato/source/blender/editors/mask/mask_draw.c
    branches/soc-2011-tomato/source/blender/editors/mask/mask_edit.c
    branches/soc-2011-tomato/source/blender/editors/mask/mask_ops.c
    branches/soc-2011-tomato/source/blender/editors/object/object_bake.c
    branches/soc-2011-tomato/source/blender/editors/object/object_modifier.c
    branches/soc-2011-tomato/source/blender/editors/space_clip/clip_editor.c
    branches/soc-2011-tomato/source/blender/editors/space_clip/space_clip.c
    branches/soc-2011-tomato/source/blender/editors/space_file/file_ops.c
    branches/soc-2011-tomato/source/blender/editors/space_file/space_file.c
    branches/soc-2011-tomato/source/blender/editors/space_image/image_edit.c
    branches/soc-2011-tomato/source/blender/editors/space_image/image_ops.c
    branches/soc-2011-tomato/source/blender/editors/space_image/space_image.c
    branches/soc-2011-tomato/source/blender/editors/space_logic/logic_window.c
    branches/soc-2011-tomato/source/blender/editors/space_node/drawnode.c
    branches/soc-2011-tomato/source/blender/editors/space_node/node_header.c
    branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_draw.c
    branches/soc-2011-tomato/source/blender/editors/space_sequencer/sequencer_edit.c
    branches/soc-2011-tomato/source/blender/editors/transform/transform.c
    branches/soc-2011-tomato/source/blender/editors/transform/transform_conversions.c
    branches/soc-2011-tomato/source/blender/editors/transform/transform_generics.c
    branches/soc-2011-tomato/source/blender/editors/util/undo.c
    branches/soc-2011-tomato/source/blender/editors/uvedit/uvedit_unwrap_ops.c
    branches/soc-2011-tomato/source/blender/makesdna/DNA_view3d_types.h
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_access.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_sensor.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_space.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_userdef.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_particleinstance.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_screw.c
    branches/soc-2011-tomato/source/blender/render/intern/source/imagetexture.c
    branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_playanim.c
    branches/soc-2011-tomato/source/gameengine/Ketsji/KX_Scene.cpp
    branches/soc-2011-tomato/source/tests/rna_info_dump.py

Added Paths:
-----------
    branches/soc-2011-tomato/source/tests/bl_rna_wiki_reference.py

Property Changed:
----------------
    branches/soc-2011-tomato/
    branches/soc-2011-tomato/source/blender/editors/interface/interface.c
    branches/soc-2011-tomato/source/blender/editors/space_outliner/


Property changes on: branches/soc-2011-tomato
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-50521
   + /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-50572

Modified: branches/soc-2011-tomato/build_files/cmake/macros.cmake
===================================================================
--- branches/soc-2011-tomato/build_files/cmake/macros.cmake	2012-09-13 10:51:18 UTC (rev 50572)
+++ branches/soc-2011-tomato/build_files/cmake/macros.cmake	2012-09-13 11:13:13 UTC (rev 50573)
@@ -27,7 +27,10 @@
 	list_id item_check item_add
 	)
 	set(_index)
-	list(FIND ${list_id} "${item_check}" _index)
+	list(FIND "${list_id}" "${item_check}" _index)
+	if("${_index}" MATCHES "-1")
+		message(FATAL_ERROR "'${list_id}' doesn't contain '${item_check}'")
+	endif()
 	math(EXPR _index "${_index} + 1")
 	list(INSERT ${list_id} "${_index}" ${item_add})
 	unset(_index)
@@ -37,7 +40,10 @@
 	list_id item_check item_add
 	)
 	set(_index)
-	list(FIND ${list_id} "${item_check}" _index)
+	list(FIND "${list_id}" "${item_check}" _index)
+	if("${_index}" MATCHES "-1")
+		message(FATAL_ERROR "'${list_id}' doesn't contain '${item_check}'")
+	endif()
 	list(INSERT ${list_id} "${_index}" ${item_add})
 	unset(_index)
 endmacro()

Modified: branches/soc-2011-tomato/extern/libmv/third_party/ceres/SConscript
===================================================================
--- branches/soc-2011-tomato/extern/libmv/third_party/ceres/SConscript	2012-09-13 10:51:18 UTC (rev 50572)
+++ branches/soc-2011-tomato/extern/libmv/third_party/ceres/SConscript	2012-09-13 11:13:13 UTC (rev 50573)
@@ -25,6 +25,11 @@
 
 incs = '. ../../ ../../../Eigen3 ./include ./internal ../gflags'
 
+# work around broken hashtable in 10.5 SDK
+if env['OURPLATFORM'] == 'darwin' and env['WITH_BF_BOOST']:
+    incs += ' ' + env['BF_BOOST_INC']
+    defs.append('CERES_HASH_BOOST')
+
 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
     if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
         incs += ' ../msinttypes'

Modified: branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/collections_port.h
===================================================================
--- branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/collections_port.h	2012-09-13 10:51:18 UTC (rev 50572)
+++ branches/soc-2011-tomato/extern/libmv/third_party/ceres/internal/ceres/collections_port.h	2012-09-13 11:13:13 UTC (rev 50573)
@@ -33,6 +33,10 @@
 #ifndef CERES_INTERNAL_COLLECTIONS_PORT_H_
 #define CERES_INTERNAL_COLLECTIONS_PORT_H_
 
+#ifdef CERES_HASH_BOOST
+#include <boost/tr1/unordered_map.hpp>
+#include <boost/tr1/unordered_set.hpp>
+#else
 #if defined(_MSC_VER) && _MSC_VER <= 1700
 #include <unordered_map>
 #include <unordered_set>
@@ -40,6 +44,8 @@
 #include <tr1/unordered_map>
 #include <tr1/unordered_set>
 #endif
+#endif
+
 #include <utility>
 #include "ceres/integral_types.h"
 #include "ceres/internal/port.h"
@@ -118,7 +124,11 @@
 
 // Hasher for STL pairs. Requires hashers for both members to be defined.
 template<typename T>
+#ifdef CERES_HASH_BOOST
+struct hash {
+#else
 struct hash<pair<T, T> > {
+#endif
   size_t operator()(const pair<T, T>& p) const {
     size_t h1 = hash<T>()(p.first);
     size_t h2 = hash<T>()(p.second);

Modified: branches/soc-2011-tomato/intern/cycles/blender/addon/ui.py
===================================================================
--- branches/soc-2011-tomato/intern/cycles/blender/addon/ui.py	2012-09-13 10:51:18 UTC (rev 50572)
+++ branches/soc-2011-tomato/intern/cycles/blender/addon/ui.py	2012-09-13 11:13:13 UTC (rev 50573)
@@ -53,19 +53,20 @@
 
         scene = context.scene
         cscene = scene.cycles
+        device_type = context.user_preferences.system.compute_device_type
 
         split = layout.split()
 
         col = split.column()
         sub = col.column()
-        sub.active = cscene.device == 'CPU'
+        sub.enabled = (device_type == 'NONE' or cscene.device == 'CPU')
         sub.prop(cscene, "progressive")
 
         sub = col.column(align=True)
         sub.prop(cscene, "seed")
         sub.prop(cscene, "sample_clamp")
 
-        if cscene.progressive or cscene.device != 'CPU':
+        if cscene.progressive or (device_type != 'NONE' and cscene.device == 'GPU'):
             col = split.column()
             col.label(text="Samples:")
             sub = col.column(align=True)

Modified: branches/soc-2011-tomato/intern/cycles/blender/blender_session.cpp
===================================================================
--- branches/soc-2011-tomato/intern/cycles/blender/blender_session.cpp	2012-09-13 10:51:18 UTC (rev 50572)
+++ branches/soc-2011-tomato/intern/cycles/blender/blender_session.cpp	2012-09-13 11:13:13 UTC (rev 50573)
@@ -372,6 +372,12 @@
 		return;
 	}
 
+	/* if the session is still resetting the device come back later */
+	if(session->resetting()) {
+		tag_update();
+		return;
+	}
+
 	/* increase samples, but never decrease */
 	session->set_samples(session_params.samples);
 	session->set_pause(BlenderSync::get_session_pause(b_scene, background));

Modified: branches/soc-2011-tomato/intern/cycles/device/device.h
===================================================================
--- branches/soc-2011-tomato/intern/cycles/device/device.h	2012-09-13 10:51:18 UTC (rev 50572)
+++ branches/soc-2011-tomato/intern/cycles/device/device.h	2012-09-13 11:13:13 UTC (rev 50573)
@@ -115,6 +115,7 @@
 	virtual void task_add(DeviceTask& task) = 0;
 	virtual void task_wait() = 0;
 	virtual void task_cancel() = 0;
+	virtual bool task_cancelled() = 0;
 	
 	/* opengl drawing */
 	virtual void draw_pixels(device_memory& mem, int y, int w, int h,

Modified: branches/soc-2011-tomato/intern/cycles/device/device_cpu.cpp
===================================================================
--- branches/soc-2011-tomato/intern/cycles/device/device_cpu.cpp	2012-09-13 10:51:18 UTC (rev 50572)
+++ branches/soc-2011-tomato/intern/cycles/device/device_cpu.cpp	2012-09-13 11:13:13 UTC (rev 50573)
@@ -273,6 +273,11 @@
 	{
 		task_pool.cancel();
 	}
+
+	bool task_cancelled()
+	{
+		return task_pool.cancelled();
+	}
 };
 
 Device *device_cpu_create(DeviceInfo& info, int threads)

Modified: branches/soc-2011-tomato/intern/cycles/device/device_cuda.cpp
===================================================================
--- branches/soc-2011-tomato/intern/cycles/device/device_cuda.cpp	2012-09-13 10:51:18 UTC (rev 50572)
+++ branches/soc-2011-tomato/intern/cycles/device/device_cuda.cpp	2012-09-13 11:13:13 UTC (rev 50573)
@@ -892,6 +892,11 @@
 	{
 		task_pool.cancel();
 	}
+
+	bool task_cancelled()
+	{
+		return task_pool.cancelled();
+	}
 };
 
 Device *device_cuda_create(DeviceInfo& info, bool background)

Modified: branches/soc-2011-tomato/intern/cycles/device/device_multi.cpp
===================================================================
--- branches/soc-2011-tomato/intern/cycles/device/device_multi.cpp	2012-09-13 10:51:18 UTC (rev 50572)
+++ branches/soc-2011-tomato/intern/cycles/device/device_multi.cpp	2012-09-13 11:13:13 UTC (rev 50573)
@@ -312,6 +312,14 @@
 		foreach(SubDevice& sub, devices)
 			sub.device->task_cancel();
 	}
+
+	bool task_cancelled()
+	{
+		foreach(SubDevice& sub, devices)
+			if (sub.device->task_cancelled())
+				return true;
+		return false;
+	}
 };
 
 Device *device_multi_create(DeviceInfo& info, bool background)

Modified: branches/soc-2011-tomato/intern/cycles/device/device_opencl.cpp
===================================================================
--- branches/soc-2011-tomato/intern/cycles/device/device_opencl.cpp	2012-09-13 10:51:18 UTC (rev 50572)
+++ branches/soc-2011-tomato/intern/cycles/device/device_opencl.cpp	2012-09-13 11:13:13 UTC (rev 50573)
@@ -724,6 +724,11 @@
 	{
 		task_pool.cancel();
 	}
+
+	bool task_cancelled()
+	{
+		return task_pool.cancelled();
+	}
 };
 
 Device *device_opencl_create(DeviceInfo& info, bool background)
@@ -734,29 +739,31 @@
 void device_opencl_info(vector<DeviceInfo>& devices)
 {
 	vector<cl_device_id> device_ids;
-	cl_uint num_devices;
-	cl_platform_id platform_id;
-	cl_uint num_platforms;
+	cl_uint num_devices = 0;
+	vector<cl_platform_id> platform_ids;
+	cl_uint num_platforms = 0;
 
 	/* get devices */
 	if(clGetPlatformIDs(0, NULL, &num_platforms) != CL_SUCCESS || num_platforms == 0)
 		return;
+	
+	platform_ids.resize(num_platforms);
 
-	if(clGetPlatformIDs(1, &platform_id, NULL) != CL_SUCCESS)
+	if(clGetPlatformIDs(num_platforms, &platform_ids[0], NULL) != CL_SUCCESS)
 		return;
 
-	if(clGetDeviceIDs(platform_id, CL_DEVICE_TYPE_GPU|CL_DEVICE_TYPE_ACCELERATOR, 0, NULL, &num_devices) != CL_SUCCESS)
+	if(clGetDeviceIDs(platform_ids[0], CL_DEVICE_TYPE_GPU|CL_DEVICE_TYPE_ACCELERATOR, 0, NULL, &num_devices) != CL_SUCCESS || num_devices == 0)
 		return;
 	
 	device_ids.resize(num_devices);
 
-	if(clGetDeviceIDs(platform_id, CL_DEVICE_TYPE_GPU|CL_DEVICE_TYPE_ACCELERATOR, num_devices, &device_ids[0], NULL) != CL_SUCCESS)
+	if(clGetDeviceIDs(platform_ids[0], CL_DEVICE_TYPE_GPU|CL_DEVICE_TYPE_ACCELERATOR, num_devices, &device_ids[0], NULL) != CL_SUCCESS)
 		return;
 	
 	/* add devices */
 	for(int num = 0; num < num_devices; num++) {
 		cl_device_id device_id = device_ids[num];
-		char name[1024];
+		char name[1024] = "\0";
 
 		if(clGetDeviceInfo(device_id, CL_DEVICE_NAME, sizeof(name), &name, NULL) != CL_SUCCESS)
 			continue;

Modified: branches/soc-2011-tomato/intern/cycles/render/session.cpp
===================================================================
--- branches/soc-2011-tomato/intern/cycles/render/session.cpp	2012-09-13 10:51:18 UTC (rev 50572)
+++ branches/soc-2011-tomato/intern/cycles/render/session.cpp	2012-09-13 11:13:13 UTC (rev 50573)
@@ -140,6 +140,12 @@

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list