[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [50180] branches/soc-2011-tomato: svn merge ^/trunk/blender -r50173:50179

Campbell Barton ideasman42 at gmail.com
Fri Aug 24 14:50:54 CEST 2012


Revision: 50180
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50180
Author:   campbellbarton
Date:     2012-08-24 12:50:54 +0000 (Fri, 24 Aug 2012)
Log Message:
-----------
svn merge ^/trunk/blender -r50173:50179

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

Modified Paths:
--------------
    branches/soc-2011-tomato/source/blender/compositor/nodes/COM_BlurNode.cpp
    branches/soc-2011-tomato/source/blender/compositor/operations/COM_BlurBaseOperation.cpp
    branches/soc-2011-tomato/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp
    branches/soc-2011-tomato/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp
    branches/soc-2011-tomato/source/blender/imbuf/intern/openexr/CMakeLists.txt
    branches/soc-2011-tomato/source/blender/imbuf/intern/openexr/SConscript
    branches/soc-2011-tomato/source/blender/imbuf/intern/openexr/openexr_api.cpp
    branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_playanim.c
    branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_window.c

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-50173
   + /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-50179

Modified: branches/soc-2011-tomato/source/blender/compositor/nodes/COM_BlurNode.cpp
===================================================================
--- branches/soc-2011-tomato/source/blender/compositor/nodes/COM_BlurNode.cpp	2012-08-24 12:48:56 UTC (rev 50179)
+++ branches/soc-2011-tomato/source/blender/compositor/nodes/COM_BlurNode.cpp	2012-08-24 12:50:54 UTC (rev 50180)
@@ -74,14 +74,18 @@
 		operationx->setbNode(editorNode);
 		operationx->setQuality(quality);
 		operationx->setSize(1.0f);
+		operationx->setFalloff(PROP_SMOOTH);
+		operationx->setSubtract(false);
 		addLink(graph, clamp->getOutputSocket(), operationx->getInputSocket(0));
 		graph->addOperation(operationx);
 
-		GaussianYBlurOperation *operationy = new GaussianYBlurOperation();
+		GaussianAlphaYBlurOperation *operationy = new GaussianAlphaYBlurOperation();
 		operationy->setData(data);
 		operationy->setbNode(editorNode);
 		operationy->setQuality(quality);
 		operationy->setSize(1.0f);
+		operationy->setFalloff(PROP_SMOOTH);
+		operationy->setSubtract(false);
 		addLink(graph, operationx->getOutputSocket(), operationy->getInputSocket(0));
 		graph->addOperation(operationy);
 

Modified: branches/soc-2011-tomato/source/blender/compositor/operations/COM_BlurBaseOperation.cpp
===================================================================
--- branches/soc-2011-tomato/source/blender/compositor/operations/COM_BlurBaseOperation.cpp	2012-08-24 12:48:56 UTC (rev 50179)
+++ branches/soc-2011-tomato/source/blender/compositor/operations/COM_BlurBaseOperation.cpp	2012-08-24 12:50:54 UTC (rev 50180)
@@ -121,6 +121,11 @@
 				val = val * val;
 				break;
 			case PROP_LIN:
+#ifndef NDEBUG
+			/* uninitialized! */
+			case -1:
+				BLI_assert(0);
+#endif
 			default:
 				/* nothing */
 				break;

Modified: branches/soc-2011-tomato/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp
===================================================================
--- branches/soc-2011-tomato/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp	2012-08-24 12:48:56 UTC (rev 50179)
+++ branches/soc-2011-tomato/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp	2012-08-24 12:50:54 UTC (rev 50180)
@@ -33,6 +33,7 @@
 {
 	this->m_gausstab = NULL;
 	this->m_rad = 0;
+	this->m_falloff = -1;  /* intentionally invalid, so we can detect uninitialized values */
 }
 
 void *GaussianAlphaXBlurOperation::initializeTileData(rcti *rect)

Modified: branches/soc-2011-tomato/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp
===================================================================
--- branches/soc-2011-tomato/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp	2012-08-24 12:48:56 UTC (rev 50179)
+++ branches/soc-2011-tomato/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp	2012-08-24 12:50:54 UTC (rev 50180)
@@ -33,6 +33,7 @@
 {
 	this->m_gausstab = NULL;
 	this->m_rad = 0;
+	this->m_falloff = -1;  /* intentionally invalid, so we can detect uninitialized values */
 }
 
 void *GaussianAlphaYBlurOperation::initializeTileData(rcti *rect)


Property changes on: branches/soc-2011-tomato/source/blender/editors/interface/interface.c
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/ge_candy/source/blender/editors/interface/interface.c:45070-46163
/branches/ge_harmony/source/blender/editors/interface/interface.c: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/source/blender/editors/interface/interface.c:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers/source/blender/editors/interface/interface.c:38694-39989
/trunk/blender/source/blender/editors/interface/interface.c:36831-50173
   + /branches/ge_candy/source/blender/editors/interface/interface.c:45070-46163
/branches/ge_harmony/source/blender/editors/interface/interface.c: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/source/blender/editors/interface/interface.c:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers/source/blender/editors/interface/interface.c:38694-39989
/trunk/blender/source/blender/editors/interface/interface.c:36831-50179


Property changes on: branches/soc-2011-tomato/source/blender/editors/space_outliner
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/soc-2011-cucumber/source/blender/editors/space_outliner:38968,38970,38973,39045,40845
/branches/soc-2011-pepper/source/blender/editors/space_outliner:36831-38987
/trunk/blender/source/blender/editors/space_outliner:36831-50173
   + /branches/soc-2011-cucumber/source/blender/editors/space_outliner:38968,38970,38973,39045,40845
/branches/soc-2011-pepper/source/blender/editors/space_outliner:36831-38987
/trunk/blender/source/blender/editors/space_outliner:36831-50179

Modified: branches/soc-2011-tomato/source/blender/imbuf/intern/openexr/CMakeLists.txt
===================================================================
--- branches/soc-2011-tomato/source/blender/imbuf/intern/openexr/CMakeLists.txt	2012-08-24 12:48:56 UTC (rev 50179)
+++ branches/soc-2011-tomato/source/blender/imbuf/intern/openexr/CMakeLists.txt	2012-08-24 12:50:54 UTC (rev 50180)
@@ -31,6 +31,7 @@
 	../../../blenlib
 	../../../makesdna
 	../../../../../intern/guardedalloc
+	../../../../../intern/utfconv
 )
 
 set(INC_SYS

Modified: branches/soc-2011-tomato/source/blender/imbuf/intern/openexr/SConscript
===================================================================
--- branches/soc-2011-tomato/source/blender/imbuf/intern/openexr/SConscript	2012-08-24 12:48:56 UTC (rev 50179)
+++ branches/soc-2011-tomato/source/blender/imbuf/intern/openexr/SConscript	2012-08-24 12:50:54 UTC (rev 50180)
@@ -10,7 +10,9 @@
     '../../../blenlib',
     'intern/include',
     '#/intern/guardedalloc',
-    '../../../makesdna']
+    '../../../makesdna',
+    '#/intern/utfconv']
+
 incs += Split(env['BF_OPENEXR_INC'])
 
 defs = ['WITH_OPENEXR']

Modified: branches/soc-2011-tomato/source/blender/imbuf/intern/openexr/openexr_api.cpp
===================================================================
--- branches/soc-2011-tomato/source/blender/imbuf/intern/openexr/openexr_api.cpp	2012-08-24 12:48:56 UTC (rev 50179)
+++ branches/soc-2011-tomato/source/blender/imbuf/intern/openexr/openexr_api.cpp	2012-08-24 12:50:54 UTC (rev 50180)
@@ -32,12 +32,17 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <stddef.h>
+#include <fstream>
 #include <string>
 #include <set>
 
 
 #include <openexr_api.h>
 
+#if defined (WIN32) && !defined(FREE_WINDOWS)
+#include "utfconv.h"
+#endif
+
 extern "C"
 {
 
@@ -76,6 +81,7 @@
 #include <IlmImf/ImfCompression.h>
 #include <IlmImf/ImfCompressionAttribute.h>
 #include <IlmImf/ImfStringAttribute.h>
+#include <IlmImf/ImfStdIO.h>
 #include <Imath/ImathBox.h>
 #else
 #include <half.h>
@@ -90,6 +96,7 @@
 #include <ImfCompression.h>
 #include <ImfCompressionAttribute.h>
 #include <ImfStringAttribute.h>
+#include <ImfStdIO.h>
 #endif
 
 using namespace Imf;
@@ -192,6 +199,28 @@
 		header->insert(info->key, StringAttribute(info->value));
 }
 
+static void openexr_ofstream_open(std::ofstream& ofs, const char *name)
+{
+#if defined (WIN32) && !defined(FREE_WINDOWS)
+	wchar_t *wname = alloc_utf16_from_8(name, 0);
+	ofs.open(wname, std::ios_base::binary);
+	free(wname);
+#else
+	ofs.open(name, std::ios_base::binary);
+#endif
+}
+
+static void openexr_ifstream_open(std::ifstream& ifs, const char *name)
+{
+#if defined (WIN32) && !defined(FREE_WINDOWS)
+	wchar_t *wname = alloc_utf16_from_8(name, 0);
+	ifs.open(wname, std::ios_base::binary);
+	free(wname);
+#else
+	ifs.open(name, std::ios_base::binary);
+#endif
+}
+
 static int imb_save_openexr_half(struct ImBuf *ibuf, const char *name, int flags)
 {
 	const int channels = ibuf->channels;
@@ -216,8 +245,14 @@
 			header.channels().insert("Z", Channel(Imf::FLOAT));
 
 		FrameBuffer frameBuffer;
-		OutputFile *file = new OutputFile(name, header);
 
+		/* manually create ofstream, so we can handle utf-8 filepaths on windows */
+		std::ofstream std_ostream;
+		openexr_ofstream_open(std_ostream, name);
+		StdOFStream exr_ostream(std_ostream, name);
+
+		OutputFile file(exr_ostream, header);
+
 		/* we store first everything in half array */
 		RGBAZ *pixels = new RGBAZ[height * width];
 		RGBAZ *to = pixels;
@@ -281,9 +316,9 @@
 
 //		printf("OpenEXR-save: Writing OpenEXR file of height %d.\n", height);
 
-		file->setFrameBuffer(frameBuffer);
-		file->writePixels(height);
-		delete file;
+		file.setFrameBuffer(frameBuffer);
+		file.writePixels(height);
+
 		delete[] pixels;
 	}
 	catch (const std::exception &exc)
@@ -321,7 +356,14 @@
 			header.channels().insert("Z", Channel(Imf::FLOAT));
 
 		FrameBuffer frameBuffer;
-		OutputFile *file = new OutputFile(name, header);
+
+		/* manually create ofstream, so we can handle utf-8 filepaths on windows */
+		std::ofstream std_ostream;
+		openexr_ofstream_open(std_ostream, name);
+		StdOFStream exr_ostream(std_ostream, name);
+
+		OutputFile file(exr_ostream, header);
+
 		int xstride = sizeof(float) * channels;
 		int ystride = -xstride * width;

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list