[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43174] branches/soc-2011-onion-uv-tools: merge with trunk 43172
Antony Riakiotakis
kalast at gmail.com
Thu Jan 5 18:00:06 CET 2012
Revision: 43174
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43174
Author: psy-fi
Date: 2012-01-05 17:00:05 +0000 (Thu, 05 Jan 2012)
Log Message:
-----------
merge with trunk 43172
Modified Paths:
--------------
branches/soc-2011-onion-uv-tools/CMakeLists.txt
branches/soc-2011-onion-uv-tools/build_files/scons/config/win32-mingw-config.py
branches/soc-2011-onion-uv-tools/doc/python_api/examples/bpy.types.Operator.4.py
branches/soc-2011-onion-uv-tools/doc/python_api/examples/bpy.types.Operator.5.py
branches/soc-2011-onion-uv-tools/doc/python_api/rst/info_best_practice.rst
branches/soc-2011-onion-uv-tools/intern/cycles/app/cycles_server.cpp
branches/soc-2011-onion-uv-tools/intern/cycles/app/cycles_test.cpp
branches/soc-2011-onion-uv-tools/intern/cycles/blender/blender_sync.cpp
branches/soc-2011-onion-uv-tools/intern/cycles/device/device.cpp
branches/soc-2011-onion-uv-tools/intern/cycles/device/device.h
branches/soc-2011-onion-uv-tools/intern/cycles/device/device_cpu.cpp
branches/soc-2011-onion-uv-tools/intern/cycles/device/device_cuda.cpp
branches/soc-2011-onion-uv-tools/intern/cycles/device/device_intern.h
branches/soc-2011-onion-uv-tools/intern/cycles/device/device_memory.h
branches/soc-2011-onion-uv-tools/intern/cycles/device/device_multi.cpp
branches/soc-2011-onion-uv-tools/intern/cycles/device/device_network.cpp
branches/soc-2011-onion-uv-tools/intern/cycles/device/device_opencl.cpp
branches/soc-2011-onion-uv-tools/intern/cycles/render/buffers.cpp
branches/soc-2011-onion-uv-tools/intern/cycles/render/session.cpp
branches/soc-2011-onion-uv-tools/intern/cycles/render/session.h
branches/soc-2011-onion-uv-tools/intern/cycles/render/tile.cpp
branches/soc-2011-onion-uv-tools/release/scripts/startup/bl_ui/properties_data_curve.py
branches/soc-2011-onion-uv-tools/release/scripts/startup/bl_ui/properties_object_constraint.py
branches/soc-2011-onion-uv-tools/release/scripts/startup/bl_ui/space_clip.py
branches/soc-2011-onion-uv-tools/release/scripts/startup/bl_ui/space_logic.py
branches/soc-2011-onion-uv-tools/source/blender/blenkernel/BKE_sound.h
branches/soc-2011-onion-uv-tools/source/blender/blenkernel/intern/constraint.c
branches/soc-2011-onion-uv-tools/source/blender/blenkernel/intern/depsgraph.c
branches/soc-2011-onion-uv-tools/source/blender/blenkernel/intern/mesh.c
branches/soc-2011-onion-uv-tools/source/blender/blenkernel/intern/sequencer.c
branches/soc-2011-onion-uv-tools/source/blender/blenkernel/intern/sound.c
branches/soc-2011-onion-uv-tools/source/blender/blenloader/intern/readfile.c
branches/soc-2011-onion-uv-tools/source/blender/editors/object/object_edit.c
branches/soc-2011-onion-uv-tools/source/blender/editors/space_sequencer/sequencer_edit.c
branches/soc-2011-onion-uv-tools/source/blender/editors/uvedit/uvedit_smart_stitch.c
branches/soc-2011-onion-uv-tools/source/blender/makesdna/DNA_constraint_types.h
branches/soc-2011-onion-uv-tools/source/blender/makesrna/RNA_enum_types.h
branches/soc-2011-onion-uv-tools/source/blender/makesrna/intern/rna_constraint.c
branches/soc-2011-onion-uv-tools/source/blender/makesrna/intern/rna_property.c
branches/soc-2011-onion-uv-tools/source/blender/python/intern/bpy_rna.c
branches/soc-2011-onion-uv-tools/source/creator/creator.c
branches/soc-2011-onion-uv-tools/source/gameengine/Converter/KX_ConvertProperties.cpp
branches/soc-2011-onion-uv-tools/source/gameengine/Ketsji/KX_FontObject.cpp
Property Changed:
----------------
branches/soc-2011-onion-uv-tools/
branches/soc-2011-onion-uv-tools/source/blender/editors/space_outliner/
Property changes on: branches/soc-2011-onion-uv-tools
___________________________________________________________________
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:39665-43131
+ /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:39665-43172
Modified: branches/soc-2011-onion-uv-tools/CMakeLists.txt
===================================================================
--- branches/soc-2011-onion-uv-tools/CMakeLists.txt 2012-01-05 16:57:15 UTC (rev 43173)
+++ branches/soc-2011-onion-uv-tools/CMakeLists.txt 2012-01-05 17:00:05 UTC (rev 43174)
@@ -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/soc-2011-onion-uv-tools/build_files/scons/config/win32-mingw-config.py
===================================================================
--- branches/soc-2011-onion-uv-tools/build_files/scons/config/win32-mingw-config.py 2012-01-05 16:57:15 UTC (rev 43173)
+++ branches/soc-2011-onion-uv-tools/build_files/scons/config/win32-mingw-config.py 2012-01-05 17:00:05 UTC (rev 43174)
@@ -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/soc-2011-onion-uv-tools/doc/python_api/examples/bpy.types.Operator.4.py
===================================================================
--- branches/soc-2011-onion-uv-tools/doc/python_api/examples/bpy.types.Operator.4.py 2012-01-05 16:57:15 UTC (rev 43173)
+++ branches/soc-2011-onion-uv-tools/doc/python_api/examples/bpy.types.Operator.4.py 2012-01-05 17:00:05 UTC (rev 43174)
@@ -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/soc-2011-onion-uv-tools/doc/python_api/examples/bpy.types.Operator.5.py
===================================================================
--- branches/soc-2011-onion-uv-tools/doc/python_api/examples/bpy.types.Operator.5.py 2012-01-05 16:57:15 UTC (rev 43173)
+++ branches/soc-2011-onion-uv-tools/doc/python_api/examples/bpy.types.Operator.5.py 2012-01-05 17:00:05 UTC (rev 43174)
@@ -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/soc-2011-onion-uv-tools/doc/python_api/rst/info_best_practice.rst
===================================================================
--- branches/soc-2011-onion-uv-tools/doc/python_api/rst/info_best_practice.rst 2012-01-05 16:57:15 UTC (rev 43173)
+++ branches/soc-2011-onion-uv-tools/doc/python_api/rst/info_best_practice.rst 2012-01-05 17:00:05 UTC (rev 43174)
@@ -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/soc-2011-onion-uv-tools/intern/cycles/app/cycles_server.cpp
===================================================================
--- branches/soc-2011-onion-uv-tools/intern/cycles/app/cycles_server.cpp 2012-01-05 16:57:15 UTC (rev 43173)
+++ branches/soc-2011-onion-uv-tools/intern/cycles/app/cycles_server.cpp 2012-01-05 17:00:05 UTC (rev 43174)
@@ -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/soc-2011-onion-uv-tools/intern/cycles/app/cycles_test.cpp
===================================================================
--- branches/soc-2011-onion-uv-tools/intern/cycles/app/cycles_test.cpp 2012-01-05 16:57:15 UTC (rev 43173)
+++ branches/soc-2011-onion-uv-tools/intern/cycles/app/cycles_test.cpp 2012-01-05 17:00:05 UTC (rev 43174)
@@ -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/soc-2011-onion-uv-tools/intern/cycles/blender/blender_sync.cpp
===================================================================
--- branches/soc-2011-onion-uv-tools/intern/cycles/blender/blender_sync.cpp 2012-01-05 16:57:15 UTC (rev 43173)
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list