[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42803] branches/soc-2011-onion-uv-tools: merge with trunk 42802

Antony Riakiotakis kalast at gmail.com
Wed Dec 21 17:43:02 CET 2011


Revision: 42803
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=42803
Author:   psy-fi
Date:     2011-12-21 16:43:01 +0000 (Wed, 21 Dec 2011)
Log Message:
-----------
merge with trunk 42802

Modified Paths:
--------------
    branches/soc-2011-onion-uv-tools/CMakeLists.txt
    branches/soc-2011-onion-uv-tools/SConstruct
    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-vc-config.py
    branches/soc-2011-onion-uv-tools/intern/cycles/app/cycles_test.cpp
    branches/soc-2011-onion-uv-tools/intern/cycles/blender/addon/engine.py
    branches/soc-2011-onion-uv-tools/intern/cycles/blender/blender_camera.cpp
    branches/soc-2011-onion-uv-tools/intern/cycles/blender/blender_session.cpp
    branches/soc-2011-onion-uv-tools/intern/cycles/blender/blender_shader.cpp
    branches/soc-2011-onion-uv-tools/intern/cycles/blender/blender_sync.h
    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_opencl.cpp
    branches/soc-2011-onion-uv-tools/intern/cycles/kernel/CMakeLists.txt
    branches/soc-2011-onion-uv-tools/intern/cycles/kernel/kernel.cl
    branches/soc-2011-onion-uv-tools/intern/cycles/kernel/kernel.cpp
    branches/soc-2011-onion-uv-tools/intern/cycles/kernel/kernel.cu
    branches/soc-2011-onion-uv-tools/intern/cycles/kernel/kernel.h
    branches/soc-2011-onion-uv-tools/intern/cycles/kernel/kernel_camera.h
    branches/soc-2011-onion-uv-tools/intern/cycles/kernel/kernel_compat_opencl.h
    branches/soc-2011-onion-uv-tools/intern/cycles/kernel/kernel_film.h
    branches/soc-2011-onion-uv-tools/intern/cycles/kernel/kernel_optimized.cpp
    branches/soc-2011-onion-uv-tools/intern/cycles/kernel/kernel_path.h
    branches/soc-2011-onion-uv-tools/intern/cycles/kernel/kernel_random.h
    branches/soc-2011-onion-uv-tools/intern/cycles/kernel/kernel_types.h
    branches/soc-2011-onion-uv-tools/intern/cycles/render/buffers.cpp
    branches/soc-2011-onion-uv-tools/intern/cycles/render/buffers.h
    branches/soc-2011-onion-uv-tools/intern/cycles/render/camera.cpp
    branches/soc-2011-onion-uv-tools/intern/cycles/render/graph.cpp
    branches/soc-2011-onion-uv-tools/intern/cycles/render/graph.h
    branches/soc-2011-onion-uv-tools/intern/cycles/render/nodes.cpp
    branches/soc-2011-onion-uv-tools/intern/cycles/render/nodes.h
    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/intern/cycles/render/tile.h
    branches/soc-2011-onion-uv-tools/intern/cycles/util/util_math.h
    branches/soc-2011-onion-uv-tools/intern/cycles/util/util_transform.h
    branches/soc-2011-onion-uv-tools/intern/ghost/intern/GHOST_WindowCocoa.mm
    branches/soc-2011-onion-uv-tools/release/scripts/startup/bl_operators/wm.py
    branches/soc-2011-onion-uv-tools/release/scripts/startup/bl_ui/properties_game.py
    branches/soc-2011-onion-uv-tools/release/scripts/startup/bl_ui/properties_particle.py
    branches/soc-2011-onion-uv-tools/release/scripts/startup/bl_ui/properties_render.py
    branches/soc-2011-onion-uv-tools/release/scripts/startup/bl_ui/properties_scene.py
    branches/soc-2011-onion-uv-tools/release/scripts/startup/bl_ui/space_logic.py
    branches/soc-2011-onion-uv-tools/release/scripts/startup/bl_ui/space_node.py
    branches/soc-2011-onion-uv-tools/release/scripts/startup/bl_ui/space_text.py
    branches/soc-2011-onion-uv-tools/release/scripts/startup/bl_ui/space_view3d.py
    branches/soc-2011-onion-uv-tools/source/blender/blenfont/intern/blf_lang.c
    branches/soc-2011-onion-uv-tools/source/blender/blenkernel/BKE_customdata.h
    branches/soc-2011-onion-uv-tools/source/blender/blenkernel/BKE_modifier.h
    branches/soc-2011-onion-uv-tools/source/blender/blenkernel/BKE_node.h
    branches/soc-2011-onion-uv-tools/source/blender/blenkernel/BKE_texture.h
    branches/soc-2011-onion-uv-tools/source/blender/blenkernel/intern/DerivedMesh.c
    branches/soc-2011-onion-uv-tools/source/blender/blenkernel/intern/cdderivedmesh.c
    branches/soc-2011-onion-uv-tools/source/blender/blenkernel/intern/customdata.c
    branches/soc-2011-onion-uv-tools/source/blender/blenkernel/intern/deform.c
    branches/soc-2011-onion-uv-tools/source/blender/blenkernel/intern/dynamicpaint.c
    branches/soc-2011-onion-uv-tools/source/blender/blenkernel/intern/modifier.c
    branches/soc-2011-onion-uv-tools/source/blender/blenkernel/intern/movieclip.c
    branches/soc-2011-onion-uv-tools/source/blender/blenkernel/intern/node.c
    branches/soc-2011-onion-uv-tools/source/blender/blenkernel/intern/texture.c
    branches/soc-2011-onion-uv-tools/source/blender/blenkernel/intern/tracking.c
    branches/soc-2011-onion-uv-tools/source/blender/blenlib/BLI_dynstr.h
    branches/soc-2011-onion-uv-tools/source/blender/blenlib/BLI_math_vector.h
    branches/soc-2011-onion-uv-tools/source/blender/blenlib/BLI_utildefines.h
    branches/soc-2011-onion-uv-tools/source/blender/blenlib/CMakeLists.txt
    branches/soc-2011-onion-uv-tools/source/blender/blenlib/intern/BLI_dynstr.c
    branches/soc-2011-onion-uv-tools/source/blender/blenlib/intern/bpath.c
    branches/soc-2011-onion-uv-tools/source/blender/blenlib/intern/math_vector.c
    branches/soc-2011-onion-uv-tools/source/blender/blenloader/CMakeLists.txt
    branches/soc-2011-onion-uv-tools/source/blender/blenloader/SConscript
    branches/soc-2011-onion-uv-tools/source/blender/blenloader/intern/readfile.c
    branches/soc-2011-onion-uv-tools/source/blender/editors/include/ED_mesh.h
    branches/soc-2011-onion-uv-tools/source/blender/editors/interface/interface.c
    branches/soc-2011-onion-uv-tools/source/blender/editors/interface/interface_handlers.c
    branches/soc-2011-onion-uv-tools/source/blender/editors/interface/interface_panel.c
    branches/soc-2011-onion-uv-tools/source/blender/editors/interface/interface_regions.c
    branches/soc-2011-onion-uv-tools/source/blender/editors/interface/interface_templates.c
    branches/soc-2011-onion-uv-tools/source/blender/editors/interface/interface_widgets.c
    branches/soc-2011-onion-uv-tools/source/blender/editors/mesh/editface.c
    branches/soc-2011-onion-uv-tools/source/blender/editors/mesh/meshtools.c
    branches/soc-2011-onion-uv-tools/source/blender/editors/object/object_edit.c
    branches/soc-2011-onion-uv-tools/source/blender/editors/object/object_intern.h
    branches/soc-2011-onion-uv-tools/source/blender/editors/object/object_modifier.c
    branches/soc-2011-onion-uv-tools/source/blender/editors/object/object_ops.c
    branches/soc-2011-onion-uv-tools/source/blender/editors/object/object_vgroup.c
    branches/soc-2011-onion-uv-tools/source/blender/editors/screen/screen_ops.c
    branches/soc-2011-onion-uv-tools/source/blender/editors/sculpt_paint/paint_ops.c
    branches/soc-2011-onion-uv-tools/source/blender/editors/space_node/node_buttons.c
    branches/soc-2011-onion-uv-tools/source/blender/editors/space_node/node_draw.c
    branches/soc-2011-onion-uv-tools/source/blender/editors/space_node/node_edit.c
    branches/soc-2011-onion-uv-tools/source/blender/editors/space_node/node_intern.h
    branches/soc-2011-onion-uv-tools/source/blender/editors/space_node/node_ops.c
    branches/soc-2011-onion-uv-tools/source/blender/editors/space_node/node_select.c
    branches/soc-2011-onion-uv-tools/source/blender/editors/space_node/node_state.c
    branches/soc-2011-onion-uv-tools/source/blender/editors/space_text/text_ops.c
    branches/soc-2011-onion-uv-tools/source/blender/editors/space_view3d/drawmesh.c
    branches/soc-2011-onion-uv-tools/source/blender/editors/space_view3d/drawobject.c
    branches/soc-2011-onion-uv-tools/source/blender/imbuf/CMakeLists.txt
    branches/soc-2011-onion-uv-tools/source/blender/imbuf/intern/thumbs.c
    branches/soc-2011-onion-uv-tools/source/blender/makesdna/DNA_scene_types.h
    branches/soc-2011-onion-uv-tools/source/blender/makesdna/DNA_world_types.h
    branches/soc-2011-onion-uv-tools/source/blender/makesrna/intern/rna_movieclip.c
    branches/soc-2011-onion-uv-tools/source/blender/makesrna/intern/rna_nodetree.c
    branches/soc-2011-onion-uv-tools/source/blender/makesrna/intern/rna_object.c
    branches/soc-2011-onion-uv-tools/source/blender/makesrna/intern/rna_object_api.c
    branches/soc-2011-onion-uv-tools/source/blender/makesrna/intern/rna_scene.c
    branches/soc-2011-onion-uv-tools/source/blender/makesrna/intern/rna_space.c
    branches/soc-2011-onion-uv-tools/source/blender/makesrna/intern/rna_userdef.c
    branches/soc-2011-onion-uv-tools/source/blender/makesrna/intern/rna_world.c
    branches/soc-2011-onion-uv-tools/source/blender/modifiers/intern/MOD_solidify.c
    branches/soc-2011-onion-uv-tools/source/blender/modifiers/intern/MOD_uvproject.c
    branches/soc-2011-onion-uv-tools/source/blender/modifiers/intern/MOD_weightvgedit.c
    branches/soc-2011-onion-uv-tools/source/blender/modifiers/intern/MOD_weightvgmix.c
    branches/soc-2011-onion-uv-tools/source/blender/modifiers/intern/MOD_weightvgproximity.c
    branches/soc-2011-onion-uv-tools/source/blender/nodes/shader/node_shader_util.c
    branches/soc-2011-onion-uv-tools/source/blender/python/generic/bgl.c
    branches/soc-2011-onion-uv-tools/source/blender/python/generic/idprop_py_api.c
    branches/soc-2011-onion-uv-tools/source/blender/python/generic/py_capi_utils.c
    branches/soc-2011-onion-uv-tools/source/blender/python/intern/bpy_app_handlers.c
    branches/soc-2011-onion-uv-tools/source/blender/python/intern/bpy_props.c
    branches/soc-2011-onion-uv-tools/source/blender/python/intern/bpy_rna.c
    branches/soc-2011-onion-uv-tools/source/blender/python/intern/bpy_rna_anim.c
    branches/soc-2011-onion-uv-tools/source/blender/python/intern/bpy_rna_callback.c
    branches/soc-2011-onion-uv-tools/source/blender/python/intern/gpu.c
    branches/soc-2011-onion-uv-tools/source/blender/python/mathutils/mathutils.c
    branches/soc-2011-onion-uv-tools/source/blender/python/mathutils/mathutils.h
    branches/soc-2011-onion-uv-tools/source/blender/python/mathutils/mathutils_Color.c
    branches/soc-2011-onion-uv-tools/source/blender/python/mathutils/mathutils_Euler.c
    branches/soc-2011-onion-uv-tools/source/blender/python/mathutils/mathutils_Matrix.c
    branches/soc-2011-onion-uv-tools/source/blender/python/mathutils/mathutils_Matrix.h
    branches/soc-2011-onion-uv-tools/source/blender/python/mathutils/mathutils_Quaternion.c
    branches/soc-2011-onion-uv-tools/source/blender/python/mathutils/mathutils_Vector.c
    branches/soc-2011-onion-uv-tools/source/blender/python/mathutils/mathutils_Vector.h
    branches/soc-2011-onion-uv-tools/source/blender/python/mathutils/mathutils_geometry.c
    branches/soc-2011-onion-uv-tools/source/blender/python/mathutils/mathutils_noise.c
    branches/soc-2011-onion-uv-tools/source/blender/render/intern/source/external_engine.c
    branches/soc-2011-onion-uv-tools/source/blender/render/intern/source/render_texture.c
    branches/soc-2011-onion-uv-tools/source/creator/CMakeLists.txt
    branches/soc-2011-onion-uv-tools/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
    branches/soc-2011-onion-uv-tools/source/gameengine/BlenderRoutines/KX_BlenderInputDevice.h
    branches/soc-2011-onion-uv-tools/source/gameengine/BlenderRoutines/KX_BlenderKeyboardDevice.cpp
    branches/soc-2011-onion-uv-tools/source/gameengine/BlenderRoutines/KX_BlenderKeyboardDevice.h
    branches/soc-2011-onion-uv-tools/source/gameengine/Converter/BL_BlenderDataConversion.cpp
    branches/soc-2011-onion-uv-tools/source/gameengine/Converter/BL_BlenderDataConversion.h
    branches/soc-2011-onion-uv-tools/source/gameengine/Converter/KX_ConvertSensors.cpp
    branches/soc-2011-onion-uv-tools/source/gameengine/GamePlayer/common/GPC_KeyboardDevice.h
    branches/soc-2011-onion-uv-tools/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
    branches/soc-2011-onion-uv-tools/source/gameengine/GamePlayer/ghost/GPG_Application.h
    branches/soc-2011-onion-uv-tools/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
    branches/soc-2011-onion-uv-tools/source/gameengine/Ketsji/KX_KetsjiEngine.h
    branches/soc-2011-onion-uv-tools/source/gameengine/Ketsji/KX_PythonInit.cpp
    branches/soc-2011-onion-uv-tools/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp
    branches/soc-2011-onion-uv-tools/source/tests/CMakeLists.txt

Added Paths:
-----------
    branches/soc-2011-onion-uv-tools/source/blender/blenlib/BLI_md5.h
    branches/soc-2011-onion-uv-tools/source/blender/blenlib/intern/md5.c
    branches/soc-2011-onion-uv-tools/source/tests/bl_pyapi_mathutils.py

Removed Paths:
-------------
    branches/soc-2011-onion-uv-tools/source/blender/imbuf/intern/md5.c
    branches/soc-2011-onion-uv-tools/source/blender/imbuf/intern/md5.h

Property Changed:
----------------
    branches/soc-2011-onion-uv-tools/


Property changes on: branches/soc-2011-onion-uv-tools
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/soc-2011-cucumber:37517
/branches/soc-2011-tomato:42376,42378-42379,42397,42400
/trunk/blender:39665-42687
   + /branches/soc-2011-cucumber:37517
/branches/soc-2011-tomato:42376,42378-42379,42397,42400
/trunk/blender:39665-42802

Modified: branches/soc-2011-onion-uv-tools/CMakeLists.txt
===================================================================
--- branches/soc-2011-onion-uv-tools/CMakeLists.txt	2011-12-21 16:26:45 UTC (rev 42802)
+++ branches/soc-2011-onion-uv-tools/CMakeLists.txt	2011-12-21 16:43:01 UTC (rev 42803)
@@ -649,10 +649,6 @@
 		set(ICONV_LIBPATH ${ICONV}/lib)
 	endif()
 
-	set(PNG "${LIBDIR}/png")
-	set(PNG_INCLUDE_DIR "${PNG}/include")
-	set(PNG_LIBPATH ${PNG}/lib) # not cmake defined
-
 	set(JPEG "${LIBDIR}/jpeg")
 	set(JPEG_INCLUDE_DIR "${JPEG}/include")
 	set(JPEG_LIBPATH ${JPEG}/lib) # not cmake defined
@@ -727,12 +723,12 @@
 			set(GETTEXT_LIBRARIES gnu_gettext)
 		endif()
 
-		if(CMAKE_CL_64)
-			set(PNG_LIBRARIES libpng)
-		else()
-			set(PNG_LIBRARIES libpng_st)
-		endif()
+		set(PNG_LIBRARIES libpng)
 		set(JPEG_LIBRARIES libjpeg)
+		
+		set(PNG "${LIBDIR}/png")
+		set(PNG_INCLUDE_DIR "${PNG}/include")
+		set(PNG_LIBPATH ${PNG}/lib) # not cmake defined
 
 		set(ZLIB_INCLUDE_DIRS ${LIBDIR}/zlib/include)
 		if(CMAKE_CL_64)
@@ -913,6 +909,10 @@
 			set(GETTEXT_LIBPATH ${GETTEXT}/lib)
 			set(GETTEXT_LIBRARIES intl)
 		endif()
+		
+		set(PNG "${LIBDIR}/gcc/png")
+		set(PNG_INCLUDE_DIR "${PNG}/include")
+		set(PNG_LIBPATH ${PNG}/lib) # not cmake defined
 
 		set(JPEG_LIBRARIES libjpeg)
 		set(PNG_LIBRARIES png)

Modified: branches/soc-2011-onion-uv-tools/SConstruct
===================================================================
--- branches/soc-2011-onion-uv-tools/SConstruct	2011-12-21 16:26:45 UTC (rev 42802)
+++ branches/soc-2011-onion-uv-tools/SConstruct	2011-12-21 16:43:01 UTC (rev 42803)
@@ -726,10 +726,6 @@
         # For MinGW and linuxcross static linking will be used
         dllsources += ['${LCGDIR}/gettext/lib/gnu_gettext.dll']
 
-    #currently win64-vc doesn't appear to have libpng.dll
-    if env['OURPLATFORM'] != 'win64-vc':
-        dllsources += ['${BF_PNG_LIBPATH}/libpng.dll']
-
     dllsources += ['${BF_ZLIB_LIBPATH}/zlib.dll']
     # Used when linking to libtiff was dynamic
     # keep it here until compilation on all platform would be ok

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	2011-12-21 16:26:45 UTC (rev 42802)
+++ branches/soc-2011-onion-uv-tools/build_files/scons/config/win32-mingw-config.py	2011-12-21 16:43:01 UTC (rev 42803)
@@ -64,7 +64,7 @@
 BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
 
 WITH_BF_PNG = True
-BF_PNG = LIBDIR + '/png'
+BF_PNG = LIBDIR + '/gcc/png'
 BF_PNG_INC = '${BF_PNG}/include'
 BF_PNG_LIB = 'png'
 BF_PNG_LIBPATH = '${BF_PNG}/lib'

Modified: branches/soc-2011-onion-uv-tools/build_files/scons/config/win32-vc-config.py
===================================================================
--- branches/soc-2011-onion-uv-tools/build_files/scons/config/win32-vc-config.py	2011-12-21 16:26:45 UTC (rev 42802)
+++ branches/soc-2011-onion-uv-tools/build_files/scons/config/win32-vc-config.py	2011-12-21 16:43:01 UTC (rev 42803)
@@ -72,7 +72,7 @@
 WITH_BF_PNG = True
 BF_PNG = LIBDIR + '/png'
 BF_PNG_INC = '${BF_PNG}/include'
-BF_PNG_LIB = 'libpng_st'
+BF_PNG_LIB = 'libpng'
 BF_PNG_LIBPATH = '${BF_PNG}/lib'
 
 WITH_BF_TIFF = True

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	2011-12-21 16:26:45 UTC (rev 42802)
+++ branches/soc-2011-onion-uv-tools/intern/cycles/app/cycles_test.cpp	2011-12-21 16:43:01 UTC (rev 42803)
@@ -82,10 +82,21 @@
 	session_print(status);
 }
 
+static BufferParams session_buffer_params()
+{
+	BufferParams buffer_params;
+	buffer_params.width = options.width;
+	buffer_params.height = options.height;
+	buffer_params.full_width = options.width;
+	buffer_params.full_height = options.height;
+
+	return buffer_params;
+}
+
 static void session_init()
 {
 	options.session = new Session(options.session_params);
-	options.session->reset(options.width, options.height, options.session_params.samples);
+	options.session->reset(session_buffer_params(), options.session_params.samples);
 	options.session->scene = options.scene;
 	
 	if(options.session_params.background && !options.quiet)
@@ -151,7 +162,7 @@
 
 static void display()
 {
-	options.session->draw(options.width, options.height);
+	options.session->draw(session_buffer_params());
 
 	display_info(options.session->progress);
 }
@@ -162,13 +173,13 @@
 	options.height= height;
 
 	if(options.session)
-		options.session->reset(options.width, options.height, options.session_params.samples);
+		options.session->reset(session_buffer_params(), options.session_params.samples);
 }
 
 void keyboard(unsigned char key)
 {
 	if(key == 'r')
-		options.session->reset(options.width, options.height, options.session_params.samples);
+		options.session->reset(session_buffer_params(), options.session_params.samples);
 	else if(key == 27) // escape
 		options.session->progress.set_cancel("Cancelled");
 }

Modified: branches/soc-2011-onion-uv-tools/intern/cycles/blender/addon/engine.py
===================================================================
--- branches/soc-2011-onion-uv-tools/intern/cycles/blender/addon/engine.py	2011-12-21 16:26:45 UTC (rev 42802)
+++ branches/soc-2011-onion-uv-tools/intern/cycles/blender/addon/engine.py	2011-12-21 16:43:01 UTC (rev 42803)
@@ -62,11 +62,7 @@
 
 def update(engine, data, scene):
     import bcycles
-    if scene.render.use_border:
-        engine.report({'ERROR'}, "Border rendering not supported yet")
-        free(engine)
-    else:
-        bcycles.sync(engine.session)
+    bcycles.sync(engine.session)
 
 
 def draw(engine, region, v3d, rv3d):

Modified: branches/soc-2011-onion-uv-tools/intern/cycles/blender/blender_camera.cpp
===================================================================
--- branches/soc-2011-onion-uv-tools/intern/cycles/blender/blender_camera.cpp	2011-12-21 16:26:45 UTC (rev 42802)
+++ branches/soc-2011-onion-uv-tools/intern/cycles/blender/blender_camera.cpp	2011-12-21 16:43:01 UTC (rev 42803)
@@ -207,6 +207,7 @@
 
 	/* transform, note the blender camera points along the negative z-axis */
 	cam->matrix = bcam->matrix * transform_scale(1.0f, 1.0f, -1.0f);
+	cam->matrix = transform_clear_scale(cam->matrix);
 
 	/* set update flag */
 	if(cam->modified(prevcam))
@@ -286,5 +287,29 @@
 	blender_camera_sync(scene->camera, &bcam, width, height);
 }
 
+BufferParams BlenderSync::get_buffer_params(BL::Scene b_scene, BL::RegionView3D b_rv3d, int width, int height)
+{
+	BufferParams params;
+
+	params.full_width = width;
+	params.full_height = height;
+
+	/* border render */
+	BL::RenderSettings r = b_scene.render();
+
+	if(!b_rv3d && r.use_border()) {
+		params.full_x = r.border_min_x()*width;
+		params.full_y = r.border_min_y()*height;
+		params.width = (int)(r.border_max_x()*width) - params.full_x;
+		params.height = (int)(r.border_max_y()*height) - params.full_y;
+	}
+	else {
+		params.width = width;
+		params.height = height;
+	}
+
+	return params;
+}
+
 CCL_NAMESPACE_END
 

Modified: branches/soc-2011-onion-uv-tools/intern/cycles/blender/blender_session.cpp
===================================================================
--- branches/soc-2011-onion-uv-tools/intern/cycles/blender/blender_session.cpp	2011-12-21 16:26:45 UTC (rev 42802)
+++ branches/soc-2011-onion-uv-tools/intern/cycles/blender/blender_session.cpp	2011-12-21 16:43:01 UTC (rev 42803)
@@ -100,7 +100,9 @@
 	session->set_pause(BlenderSync::get_session_pause(b_scene, background));
 
 	/* start rendering */
-	session->reset(width, height, session_params.samples);
+	BufferParams buffer_params = BlenderSync::get_buffer_params(b_scene, b_rv3d, width, height);
+
+	session->reset(buffer_params, session_params.samples);
 	session->start();
 }
 
@@ -135,7 +137,10 @@
 	if(!pixels)
 		return;
 
-	struct RenderResult *rrp = RE_engine_begin_result((RenderEngine*)b_engine.ptr.data, 0, 0, width, height);
+	BufferParams buffer_params = BlenderSync::get_buffer_params(b_scene, b_rv3d, width, height);
+	int w = buffer_params.width, h = buffer_params.height;
+
+	struct RenderResult *rrp = RE_engine_begin_result((RenderEngine*)b_engine.ptr.data, 0, 0, w, h);
 	PointerRNA rrptr;
 	RNA_pointer_create(NULL, &RNA_RenderResult, rrp, &rrptr);
 	BL::RenderResult rr(rrptr);
@@ -188,8 +193,10 @@
 	session->scene->mutex.unlock();
 
 	/* reset if needed */
-	if(scene->need_reset())
-		session->reset(width, height, session_params.samples);
+	if(scene->need_reset()) {
+		BufferParams buffer_params = BlenderSync::get_buffer_params(b_scene, b_rv3d, width, height);
+		session->reset(buffer_params, session_params.samples);
+	}
 }
 
 bool BlenderSession::draw(int w, int h)
@@ -225,7 +232,9 @@
 		/* reset if requested */
 		if(reset) {
 			SessionParams session_params = BlenderSync::get_session_params(b_scene, background);
-			session->reset(width, height, session_params.samples);
+			BufferParams buffer_params = BlenderSync::get_buffer_params(b_scene, b_rv3d, width, height);
+
+			session->reset(buffer_params, session_params.samples);
 		}
 	}
 
@@ -233,7 +242,9 @@
 	update_status_progress();
 
 	/* draw */
-	return !session->draw(width, height);
+	BufferParams buffer_params = BlenderSync::get_buffer_params(b_scene, b_rv3d, width, height);
+
+	return !session->draw(buffer_params);
 }
 
 void BlenderSession::get_status(string& status, string& substatus)

Modified: branches/soc-2011-onion-uv-tools/intern/cycles/blender/blender_shader.cpp
===================================================================
--- branches/soc-2011-onion-uv-tools/intern/cycles/blender/blender_shader.cpp	2011-12-21 16:26:45 UTC (rev 42802)
+++ branches/soc-2011-onion-uv-tools/intern/cycles/blender/blender_shader.cpp	2011-12-21 16:43:01 UTC (rev 42803)
@@ -50,28 +50,6 @@
 
 /* Graph */
 
-static BL::NodeSocket get_node_input(BL::Node *b_group_node, BL::NodeSocket b_in)
-{
-	if(b_group_node) {
-

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list