[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43162] branches/bmesh/blender: svn merge ^/trunk/blender -r43124:43160

Campbell Barton ideasman42 at gmail.com
Thu Jan 5 12:23:25 CET 2012


Revision: 43162
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43162
Author:   campbellbarton
Date:     2012-01-05 11:23:24 +0000 (Thu, 05 Jan 2012)
Log Message:
-----------
svn merge ^/trunk/blender -r43124:43160

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

Modified Paths:
--------------
    branches/bmesh/blender/CMakeLists.txt
    branches/bmesh/blender/build_files/scons/config/win32-mingw-config.py
    branches/bmesh/blender/doc/python_api/examples/bpy.types.Operator.4.py
    branches/bmesh/blender/doc/python_api/examples/bpy.types.Operator.5.py
    branches/bmesh/blender/doc/python_api/rst/info_best_practice.rst
    branches/bmesh/blender/intern/cycles/app/cycles_server.cpp
    branches/bmesh/blender/intern/cycles/app/cycles_test.cpp
    branches/bmesh/blender/intern/cycles/blender/blender_sync.cpp
    branches/bmesh/blender/intern/cycles/device/device.cpp
    branches/bmesh/blender/intern/cycles/device/device.h
    branches/bmesh/blender/intern/cycles/device/device_cpu.cpp
    branches/bmesh/blender/intern/cycles/device/device_cuda.cpp
    branches/bmesh/blender/intern/cycles/device/device_intern.h
    branches/bmesh/blender/intern/cycles/device/device_memory.h
    branches/bmesh/blender/intern/cycles/device/device_multi.cpp
    branches/bmesh/blender/intern/cycles/device/device_network.cpp
    branches/bmesh/blender/intern/cycles/device/device_opencl.cpp
    branches/bmesh/blender/intern/cycles/render/buffers.cpp
    branches/bmesh/blender/intern/cycles/render/session.cpp
    branches/bmesh/blender/intern/cycles/render/session.h
    branches/bmesh/blender/intern/cycles/render/tile.cpp
    branches/bmesh/blender/release/scripts/startup/bl_ui/properties_object_constraint.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/space_logic.py
    branches/bmesh/blender/source/blender/blenkernel/BKE_sound.h
    branches/bmesh/blender/source/blender/blenkernel/intern/constraint.c
    branches/bmesh/blender/source/blender/blenkernel/intern/depsgraph.c
    branches/bmesh/blender/source/blender/blenkernel/intern/movieclip.c
    branches/bmesh/blender/source/blender/blenkernel/intern/sequencer.c
    branches/bmesh/blender/source/blender/blenkernel/intern/sound.c
    branches/bmesh/blender/source/blender/blenkernel/intern/tracking.c
    branches/bmesh/blender/source/blender/blenloader/intern/readfile.c
    branches/bmesh/blender/source/blender/editors/interface/interface_draw.c
    branches/bmesh/blender/source/blender/editors/object/object_edit.c
    branches/bmesh/blender/source/blender/editors/space_sequencer/sequencer_edit.c
    branches/bmesh/blender/source/blender/makesdna/DNA_constraint_types.h
    branches/bmesh/blender/source/blender/makesrna/RNA_enum_types.h
    branches/bmesh/blender/source/blender/makesrna/intern/rna_constraint.c
    branches/bmesh/blender/source/blender/makesrna/intern/rna_property.c
    branches/bmesh/blender/source/blender/python/intern/bpy_rna.c
    branches/bmesh/blender/source/blender/render/intern/source/pipeline.c
    branches/bmesh/blender/source/creator/creator.c
    branches/bmesh/blender/source/gameengine/Converter/KX_ConvertProperties.cpp
    branches/bmesh/blender/source/gameengine/Ketsji/KX_FontObject.cpp

Property Changed:
----------------
    branches/bmesh/blender/
    branches/bmesh/blender/release/


Property changes on: branches/bmesh/blender
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/soc-2011-cucumber:37517,38384,38387,38403-38404,38407,42997-42998
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801
/trunk/blender:39992-43124
   + /branches/soc-2011-cucumber:37517,38384,38387,38403-38404,38407,42997-42998
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801
/trunk/blender:39992-43160

Modified: branches/bmesh/blender/CMakeLists.txt
===================================================================
--- branches/bmesh/blender/CMakeLists.txt	2012-01-05 11:17:00 UTC (rev 43161)
+++ branches/bmesh/blender/CMakeLists.txt	2012-01-05 11:23:24 UTC (rev 43162)
@@ -1026,9 +1026,13 @@
 			set(OPENIMAGEIO_LIBPATH ${OPENIMAGEIO}/lib)
 			set(OPENIMAGEIO_DEFINITIONS)
 		endif()
-
+		
 		set(PLATFORM_LINKFLAGS "-Xlinker --stack=2097152")
 
+		## DISABLE - causes linking errors 
+		## for re-distrobution, so users dont need mingw installed
+		# set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -static-libgcc -static-libstdc++")
+
 	endif()
 
 	# used in many places so include globally, like OpenGL

Modified: branches/bmesh/blender/build_files/scons/config/win32-mingw-config.py
===================================================================
--- branches/bmesh/blender/build_files/scons/config/win32-mingw-config.py	2012-01-05 11:17:00 UTC (rev 43161)
+++ branches/bmesh/blender/build_files/scons/config/win32-mingw-config.py	2012-01-05 11:23:24 UTC (rev 43162)
@@ -190,6 +190,10 @@
 
 PLATFORM_LINKFLAGS = ['-Xlinker', '--stack=2097152']
 
+## DISABLED, causes linking errors!
+## for re-distrobution, so users dont need mingw installed
+# PLATFORM_LINKFLAGS += ["-static-libgcc", "-static-libstdc++"]
+
 BF_DEBUG = False
 BF_DEBUG_CCFLAGS= ['-g', '-D_DEBUG']
 

Modified: branches/bmesh/blender/doc/python_api/examples/bpy.types.Operator.4.py
===================================================================
--- branches/bmesh/blender/doc/python_api/examples/bpy.types.Operator.4.py	2012-01-05 11:17:00 UTC (rev 43161)
+++ branches/bmesh/blender/doc/python_api/examples/bpy.types.Operator.4.py	2012-01-05 11:23:24 UTC (rev 43162)
@@ -22,7 +22,7 @@
     my_string = bpy.props.StringProperty(name="String Value")
 
     def execute(self, context):
-        print()
+        print("Test", self)
         return {'FINISHED'}
 
     def invoke(self, context, event):

Modified: branches/bmesh/blender/doc/python_api/examples/bpy.types.Operator.5.py
===================================================================
--- branches/bmesh/blender/doc/python_api/examples/bpy.types.Operator.5.py	2012-01-05 11:17:00 UTC (rev 43161)
+++ branches/bmesh/blender/doc/python_api/examples/bpy.types.Operator.5.py	2012-01-05 11:23:24 UTC (rev 43162)
@@ -31,6 +31,7 @@
 
     def execute(self, context):
         context.object.location.x = self.value / 100.0
+        return {'FINISHED'}
 
     def modal(self, context, event):
         if event.type == 'MOUSEMOVE':  # Apply

Modified: branches/bmesh/blender/doc/python_api/rst/info_best_practice.rst
===================================================================
--- branches/bmesh/blender/doc/python_api/rst/info_best_practice.rst	2012-01-05 11:17:00 UTC (rev 43161)
+++ branches/bmesh/blender/doc/python_api/rst/info_best_practice.rst	2012-01-05 11:23:24 UTC (rev 43162)
@@ -83,7 +83,7 @@
 
 Modifying Lists
 ^^^^^^^^^^^^^^^
-In python we can add and remove from a list, This is slower when the list length is modifier, especially at the start of the list, since all the data after the index of modification needs to be moved up or down 1 place.
+In python we can add and remove from a list, This is slower when the list length is modified, especially at the start of the list, since all the data after the index of modification needs to be moved up or down 1 place.
 
 The most simple way to add onto the end of the list is to use ``my_list.append(list_item)`` or ``my_list.extend(some_list)`` and the fastest way to remove an item is ``my_list.pop()`` or ``del my_list[-1]``.
 

Modified: branches/bmesh/blender/intern/cycles/app/cycles_server.cpp
===================================================================
--- branches/bmesh/blender/intern/cycles/app/cycles_server.cpp	2012-01-05 11:17:00 UTC (rev 43161)
+++ branches/bmesh/blender/intern/cycles/app/cycles_server.cpp	2012-01-05 11:23:24 UTC (rev 43162)
@@ -34,8 +34,9 @@
 	/* device types */
 	string devices = "";
 	string devicename = "cpu";
+	bool list = false;
 
-	vector<DeviceType> types = Device::available_types();
+	vector<DeviceType>& types = Device::available_types();
 
 	foreach(DeviceType type, types) {
 		if(devices != "")
@@ -49,6 +50,7 @@
 
 	ap.options ("Usage: cycles_server [options]",
 		"--device %s", &devicename, ("Devices to use: " + devices).c_str(),
+		"--list-devices", &list, "List information about all available devices",
 		NULL);
 
 	if(ap.parse(argc, argv) < 0) {
@@ -56,11 +58,34 @@
 		ap.usage();
 		exit(EXIT_FAILURE);
 	}
+	else if(list) {
+		vector<DeviceInfo>& devices = Device::available_devices();
 
-	DeviceType dtype = Device::type_from_string(devicename.c_str());
+		printf("Devices:\n");
 
+		foreach(DeviceInfo& info, devices) {
+			printf("    %s%s\n",
+				info.description.c_str(),
+				(info.display_device)? " (display)": "");
+		}
+
+		exit(EXIT_SUCCESS);
+	}
+
+	/* find matching device */
+	DeviceType device_type = Device::type_from_string(devicename.c_str());
+	vector<DeviceInfo>& devices = Device::available_devices();
+	DeviceInfo device_info;
+
+	foreach(DeviceInfo& device, devices) {
+		if(device_type == device.type) {
+			device_info = device;
+			break;
+		}
+	}
+
 	while(1) {
-		Device *device = Device::create(dtype);
+		Device *device = Device::create(device_info);
 		printf("Cycles Server with device: %s\n", device->description().c_str());
 		device->server_run();
 		delete device;

Modified: branches/bmesh/blender/intern/cycles/app/cycles_test.cpp
===================================================================
--- branches/bmesh/blender/intern/cycles/app/cycles_test.cpp	2012-01-05 11:17:00 UTC (rev 43161)
+++ branches/bmesh/blender/intern/cycles/app/cycles_test.cpp	2012-01-05 11:23:24 UTC (rev 43162)
@@ -203,17 +203,18 @@
 	options.session = NULL;
 	options.quiet = false;
 
-	/* devices */
-	string devices = "";
+	/* device names */
+	string device_names = "";
 	string devicename = "cpu";
+	bool list = false;
 
-	vector<DeviceType> types = Device::available_types();
+	vector<DeviceType>& types = Device::available_types();
 
 	foreach(DeviceType type, types) {
-		if(devices != "")
-			devices += ", ";
+		if(device_names != "")
+			device_names += ", ";
 
-		devices += Device::string_from_type(type);
+		device_names += Device::string_from_type(type);
 	}
 
 	/* shading system */
@@ -230,7 +231,7 @@
 
 	ap.options ("Usage: cycles_test [options] file.xml",
 		"%*", files_parse, "",
-		"--device %s", &devicename, ("Devices to use: " + devices).c_str(),
+		"--device %s", &devicename, ("Devices to use: " + device_names).c_str(),
 		"--shadingsys %s", &ssname, "Shading system to use: svm, osl",
 		"--background", &options.session_params.background, "Render in background, without user interface",
 		"--quiet", &options.quiet, "In background mode, don't print progress messages",
@@ -239,6 +240,7 @@
 		"--threads %d", &options.session_params.threads, "CPU Rendering Threads",
 		"--width  %d", &options.width, "Window width in pixel",
 		"--height %d", &options.height, "Window height in pixel",
+		"--list-devices", &list, "List information about all available devices",
 		"--help", &help, "Print help message",
 		NULL);
 	
@@ -247,26 +249,44 @@
 		ap.usage();
 		exit(EXIT_FAILURE);
 	}
+	else if(list) {
+		vector<DeviceInfo>& devices = Device::available_devices();
+		printf("Devices:\n");
+
+		foreach(DeviceInfo& info, devices) {
+			printf("    %s%s\n",
+				info.description.c_str(),
+				(info.display_device)? " (display)": "");
+		}
+
+		exit(EXIT_SUCCESS);
+	}
 	else if(help || options.filepath == "") {
 		ap.usage();
 		exit(EXIT_SUCCESS);
 	}
 
-	options.session_params.device_type = Device::type_from_string(devicename.c_str());
-
 	if(ssname == "osl")
 		options.scene_params.shadingsystem = SceneParams::OSL;
 	else if(ssname == "svm")
 		options.scene_params.shadingsystem = SceneParams::SVM;
 
-	/* handle invalid configurations */
-	bool type_available = false;
+	/* find matching device */
+	DeviceType device_type = Device::type_from_string(devicename.c_str());
+	vector<DeviceInfo>& devices = Device::available_devices();
+	DeviceInfo device_info;
+	bool device_available = false;
 
-	foreach(DeviceType dtype, types)
-		if(options.session_params.device_type == dtype)
-			type_available = true;
+	foreach(DeviceInfo& device, devices) {
+		if(device_type == device.type) {
+			options.session_params.device = device;
+			device_available = true;
+			break;
+		}
+	}
 
-	if(options.session_params.device_type == DEVICE_NONE || !type_available) {
+	/* handle invalid configurations */
+	if(options.session_params.device.type == DEVICE_NONE || !device_available) {
 		fprintf(stderr, "Unknown device: %s\n", devicename.c_str());
 		exit(EXIT_FAILURE);
 	}
@@ -278,7 +298,7 @@
 		fprintf(stderr, "Unknown shading system: %s\n", ssname.c_str());
 		exit(EXIT_FAILURE);
 	}
-	else if(options.scene_params.shadingsystem == SceneParams::OSL && options.session_params.device_type != DEVICE_CPU) {
+	else if(options.scene_params.shadingsystem == SceneParams::OSL && options.session_params.device.type != DEVICE_CPU) {
 		fprintf(stderr, "OSL shading system only works with CPU device\n");
 		exit(EXIT_FAILURE);
 	}

Modified: branches/bmesh/blender/intern/cycles/blender/blender_sync.cpp
===================================================================
--- branches/bmesh/blender/intern/cycles/blender/blender_sync.cpp	2012-01-05 11:17:00 UTC (rev 43161)
+++ branches/bmesh/blender/intern/cycles/blender/blender_sync.cpp	2012-01-05 11:23:24 UTC (rev 43162)
@@ -248,10 +248,10 @@
 	return (background)? false: get_boolean(cscene, "preview_pause");
 }
 
-static bool device_type_available(vector<DeviceType>& types, DeviceType dtype)

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list