[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47895] branches/soc-2011-tomato: Merging r47888 through r47894 from trunk into soc-2011-tomato

Sergey Sharybin sergey.vfx at gmail.com
Thu Jun 14 14:34:14 CEST 2012


Revision: 47895
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47895
Author:   nazgul
Date:     2012-06-14 12:34:01 +0000 (Thu, 14 Jun 2012)
Log Message:
-----------
Merging r47888 through r47894 from trunk into soc-2011-tomato

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

Modified Paths:
--------------
    branches/soc-2011-tomato/source/blender/blenkernel/BKE_node.h
    branches/soc-2011-tomato/source/blender/compositor/CMakeLists.txt
    branches/soc-2011-tomato/source/blender/compositor/nodes/COM_KeyingNode.cpp
    branches/soc-2011-tomato/source/blender/imbuf/intern/openexr/openexr_api.cpp
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_nodetree.c
    branches/soc-2011-tomato/source/blender/nodes/CMakeLists.txt

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-47887
   + /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-47894

Modified: branches/soc-2011-tomato/source/blender/blenkernel/BKE_node.h
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/BKE_node.h	2012-06-14 12:19:13 UTC (rev 47894)
+++ branches/soc-2011-tomato/source/blender/blenkernel/BKE_node.h	2012-06-14 12:34:01 UTC (rev 47895)
@@ -659,7 +659,7 @@
 #define CMP_NODE_OUTPUT_MULTI_FILE__DEPRECATED	267	/* DEPRECATED multi file node has been merged into regular CMP_NODE_OUTPUT_FILE */
 #define CMP_NODE_MASK		268
 #define CMP_NODE_KEYINGSCREEN		269
-#define CMP_NODE_KEYING		270
+#define CMP_NODE_KEYING			270
 
 #define CMP_NODE_GLARE		301
 #define CMP_NODE_TONEMAP	302

Modified: branches/soc-2011-tomato/source/blender/compositor/CMakeLists.txt
===================================================================
--- branches/soc-2011-tomato/source/blender/compositor/CMakeLists.txt	2012-06-14 12:19:13 UTC (rev 47894)
+++ branches/soc-2011-tomato/source/blender/compositor/CMakeLists.txt	2012-06-14 12:34:01 UTC (rev 47895)
@@ -325,16 +325,17 @@
 	operations/COM_DoubleEdgeMaskOperation.h
 
 
+	nodes/COM_KeyingScreenNode.cpp
+	nodes/COM_KeyingScreenNode.h
+	operations/COM_KeyingScreenOperation.cpp
+	operations/COM_KeyingScreenOperation.h
+
 	nodes/COM_KeyingNode.cpp
 	nodes/COM_KeyingNode.h
-	nodes/COM_KeyingScreenNode.cpp
-	nodes/COM_KeyingScreenNode.h
 	operations/COM_KeyingOperation.cpp
 	operations/COM_KeyingOperation.h
 	operations/COM_KeyingBlurOperation.cpp
 	operations/COM_KeyingBlurOperation.h
-	operations/COM_KeyingScreenOperation.cpp
-	operations/COM_KeyingScreenOperation.h
 	operations/COM_KeyingDespillOperation.cpp
 	operations/COM_KeyingDespillOperation.h
 	operations/COM_KeyingClipOperation.cpp

Modified: branches/soc-2011-tomato/source/blender/compositor/nodes/COM_KeyingNode.cpp
===================================================================
--- branches/soc-2011-tomato/source/blender/compositor/nodes/COM_KeyingNode.cpp	2012-06-14 12:19:13 UTC (rev 47894)
+++ branches/soc-2011-tomato/source/blender/compositor/nodes/COM_KeyingNode.cpp	2012-06-14 12:34:01 UTC (rev 47895)
@@ -214,7 +214,7 @@
 	/* despill output image */
 	if (keying_data->despill_factor > 0.0f) {
 		postprocessedImage = setupDespill(graph, postprocessedImage,
-		                                  keyingOperation->getInputSocket(0)->getConnection()->getFromSocket(),
+		                                  keyingOperation->getInputSocket(1)->getConnection()->getFromSocket(),
 		                                  keying_data->despill_factor);
 	}
 


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-47887
   + /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-47894


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-47887
   + /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-47894

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-06-14 12:19:13 UTC (rev 47894)
+++ branches/soc-2011-tomato/source/blender/imbuf/intern/openexr/openexr_api.cpp	2012-06-14 12:34:01 UTC (rev 47895)
@@ -194,10 +194,11 @@
 
 static int imb_save_openexr_half(struct ImBuf *ibuf, const char *name, int flags)
 {
-	int channels = ibuf->channels;
-	int width = ibuf->x;
-	int height = ibuf->y;
-	int write_zbuf = (flags & IB_zbuffloat) && ibuf->zbuf_float != NULL;   // summarize
+	const int channels = ibuf->channels;
+	const int is_alpha = (channels >= 4) && (ibuf->planes == 32);
+	const int is_zbuf = (flags & IB_zbuffloat) && ibuf->zbuf_float != NULL; /* summarize */
+	const int width = ibuf->x;
+	const int height = ibuf->y;
 
 	try
 	{
@@ -209,9 +210,9 @@
 		header.channels().insert("R", Channel(HALF));
 		header.channels().insert("G", Channel(HALF));
 		header.channels().insert("B", Channel(HALF));
-		if (ibuf->planes == 32 && channels >= 4)
+		if (is_alpha)
 			header.channels().insert("A", Channel(HALF));
-		if (write_zbuf)     // z we do as float always
+		if (is_zbuf)     // z we do as float always
 			header.channels().insert("Z", Channel(Imf::FLOAT));
 
 		FrameBuffer frameBuffer;
@@ -220,16 +221,16 @@
 		/* we store first everything in half array */
 		RGBAZ *pixels = new RGBAZ[height * width];
 		RGBAZ *to = pixels;
-		int xstride = sizeof (RGBAZ);
+		int xstride = sizeof(RGBAZ);
 		int ystride = xstride * width;
 
 		/* indicate used buffers */
 		frameBuffer.insert("R", Slice(HALF,  (char *) &pixels[0].r, xstride, ystride));
 		frameBuffer.insert("G", Slice(HALF,  (char *) &pixels[0].g, xstride, ystride));
 		frameBuffer.insert("B", Slice(HALF,  (char *) &pixels[0].b, xstride, ystride));
-		if (ibuf->planes == 32 && channels >= 4)
+		if (is_alpha)
 			frameBuffer.insert("A", Slice(HALF, (char *) &pixels[0].a, xstride, ystride));
-		if (write_zbuf)
+		if (is_zbuf)
 			frameBuffer.insert("Z", Slice(Imf::FLOAT, (char *)(ibuf->zbuf_float + (height - 1) * width),
 			                              sizeof(float), sizeof(float) * -width));
 		if (ibuf->rect_float) {
@@ -298,10 +299,11 @@
 
 static int imb_save_openexr_float(struct ImBuf *ibuf, const char *name, int flags)
 {
-	int channels = ibuf->channels;
-	int width = ibuf->x;
-	int height = ibuf->y;
-	int write_zbuf = (flags & IB_zbuffloat) && ibuf->zbuf_float != NULL;   // summarize
+	const int channels = ibuf->channels;
+	const int is_alpha = (channels >= 4) && (ibuf->planes == 32);
+	const int is_zbuf = (flags & IB_zbuffloat) && ibuf->zbuf_float != NULL; /* summarize */
+	const int width = ibuf->x;
+	const int height = ibuf->y;
 
 	try
 	{
@@ -313,9 +315,9 @@
 		header.channels().insert("R", Channel(Imf::FLOAT));
 		header.channels().insert("G", Channel(Imf::FLOAT));
 		header.channels().insert("B", Channel(Imf::FLOAT));
-		if (ibuf->planes == 32 && channels >= 4)
+		if (is_alpha)
 			header.channels().insert("A", Channel(Imf::FLOAT));
-		if (write_zbuf)
+		if (is_zbuf)
 			header.channels().insert("Z", Channel(Imf::FLOAT));
 
 		FrameBuffer frameBuffer;
@@ -333,9 +335,9 @@
 		frameBuffer.insert("R", Slice(Imf::FLOAT,  (char *)rect[0], xstride, ystride));
 		frameBuffer.insert("G", Slice(Imf::FLOAT,  (char *)rect[1], xstride, ystride));
 		frameBuffer.insert("B", Slice(Imf::FLOAT,  (char *)rect[2], xstride, ystride));
-		if (ibuf->planes == 32 && channels >= 4)
+		if (is_alpha)
 			frameBuffer.insert("A", Slice(Imf::FLOAT,  (char *)rect[3], xstride, ystride));
-		if (write_zbuf)
+		if (is_zbuf)
 			frameBuffer.insert("Z", Slice(Imf::FLOAT, (char *) (ibuf->zbuf_float + (height - 1) * width),
 			                              sizeof(float), sizeof(float) * -width));
 		file->setFrameBuffer(frameBuffer);
@@ -943,13 +945,16 @@
 	return chan;
 }
 
-
-
 static int exr_has_zbuffer(InputFile *file)
 {
 	return !(file->header().channels().findChannel("Z") == NULL);
 }
 
+static int exr_has_alpha(InputFile *file)
+{
+	return !(file->header().channels().findChannel("A") == NULL);
+}
+
 static int exr_is_multilayer(InputFile *file)
 {
 	const StringAttribute *comments = file->header().findTypedAttribute<StringAttribute>("BlenderMultiChannel");
@@ -964,7 +969,8 @@
 	return 0;
 }
 
-struct ImBuf *imb_load_openexr(unsigned char *mem, size_t size, int flags){
+struct ImBuf *imb_load_openexr(unsigned char *mem, size_t size, int flags)
+{
 	struct ImBuf *ibuf = NULL;
 	InputFile *file = NULL;
 
@@ -977,8 +983,8 @@
 		file = new InputFile(*membuf);
 
 		Box2i dw = file->header().dataWindow();
-		int width  = dw.max.x - dw.min.x + 1;
-		int height = dw.max.y - dw.min.y + 1;
+		const int width  = dw.max.x - dw.min.x + 1;
+		const int height = dw.max.y - dw.min.y + 1;
 

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list