[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [48586] branches/soc-2011-tomato: svn merge ^/trunk/blender -r48576:48585

Campbell Barton ideasman42 at gmail.com
Wed Jul 4 13:53:48 CEST 2012


Revision: 48586
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48586
Author:   campbellbarton
Date:     2012-07-04 11:53:48 +0000 (Wed, 04 Jul 2012)
Log Message:
-----------
svn merge ^/trunk/blender -r48576:48585

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

Modified Paths:
--------------
    branches/soc-2011-tomato/intern/cycles/render/image.cpp
    branches/soc-2011-tomato/intern/cycles/render/image.h
    branches/soc-2011-tomato/intern/cycles/render/nodes.cpp
    branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_node.py
    branches/soc-2011-tomato/source/blender/compositor/intern/COM_CompositorContext.cpp
    branches/soc-2011-tomato/source/blender/compositor/intern/COM_CompositorContext.h
    branches/soc-2011-tomato/source/blender/compositor/intern/COM_Converter.cpp
    branches/soc-2011-tomato/source/blender/compositor/intern/COM_Converter.h
    branches/soc-2011-tomato/source/blender/compositor/intern/COM_ExecutionGroup.cpp
    branches/soc-2011-tomato/source/blender/compositor/intern/COM_ExecutionSystem.cpp
    branches/soc-2011-tomato/source/blender/compositor/intern/COM_ExecutionSystem.h
    branches/soc-2011-tomato/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp
    branches/soc-2011-tomato/source/blender/compositor/intern/COM_ExecutionSystemHelper.h
    branches/soc-2011-tomato/source/blender/compositor/intern/COM_Node.cpp
    branches/soc-2011-tomato/source/blender/compositor/intern/COM_Node.h
    branches/soc-2011-tomato/source/blender/compositor/intern/COM_NodeBase.cpp
    branches/soc-2011-tomato/source/blender/compositor/intern/COM_NodeBase.h
    branches/soc-2011-tomato/source/blender/compositor/intern/COM_NodeOperation.cpp
    branches/soc-2011-tomato/source/blender/compositor/intern/COM_compositor.cpp
    branches/soc-2011-tomato/source/blender/compositor/nodes/COM_BlurNode.cpp
    branches/soc-2011-tomato/source/blender/compositor/nodes/COM_BokehBlurNode.cpp
    branches/soc-2011-tomato/source/blender/compositor/nodes/COM_DefocusNode.cpp
    branches/soc-2011-tomato/source/blender/compositor/nodes/COM_DilateErodeNode.cpp
    branches/soc-2011-tomato/source/blender/compositor/nodes/COM_DoubleEdgeMaskNode.cpp
    branches/soc-2011-tomato/source/blender/compositor/nodes/COM_FilterNode.cpp
    branches/soc-2011-tomato/source/blender/compositor/nodes/COM_GlareNode.cpp
    branches/soc-2011-tomato/source/blender/compositor/nodes/COM_KeyingNode.cpp
    branches/soc-2011-tomato/source/blender/compositor/nodes/COM_KeyingScreenNode.cpp
    branches/soc-2011-tomato/source/blender/compositor/nodes/COM_LensDistortionNode.cpp
    branches/soc-2011-tomato/source/blender/compositor/nodes/COM_MaskNode.cpp
    branches/soc-2011-tomato/source/blender/compositor/nodes/COM_TonemapNode.cpp
    branches/soc-2011-tomato/source/blender/compositor/nodes/COM_VectorBlurNode.cpp
    branches/soc-2011-tomato/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
    branches/soc-2011-tomato/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.h
    branches/soc-2011-tomato/source/blender/compositor/operations/COM_WriteBufferOperation.cpp
    branches/soc-2011-tomato/source/blender/editors/space_node/node_draw.c
    branches/soc-2011-tomato/source/blender/makesdna/DNA_node_types.h
    branches/soc-2011-tomato/source/blender/makesdna/DNA_space_types.h
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_nodetree.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_space.c
    branches/soc-2011-tomato/source/blender/nodes/composite/node_composite_tree.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-48576
   + /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-48585

Modified: branches/soc-2011-tomato/intern/cycles/render/image.cpp
===================================================================
--- branches/soc-2011-tomato/intern/cycles/render/image.cpp	2012-07-04 11:48:42 UTC (rev 48585)
+++ branches/soc-2011-tomato/intern/cycles/render/image.cpp	2012-07-04 11:53:48 UTC (rev 48586)
@@ -109,8 +109,11 @@
 
 		if(slot == float_images.size()) {
 			/* max images limit reached */
-			if(float_images.size() == TEX_NUM_FLOAT_IMAGES)
+			if(float_images.size() == TEX_NUM_FLOAT_IMAGES) {
+				printf("ImageManager::add_image: byte image limit reached %d, skipping '%s'\n",
+				       TEX_NUM_IMAGES, filename.c_str());
 				return -1;
+			}
 
 			float_images.resize(float_images.size() + 1);
 		}
@@ -141,8 +144,11 @@
 
 		if(slot == images.size()) {
 			/* max images limit reached */
-			if(images.size() == TEX_NUM_IMAGES)
+			if(images.size() == TEX_NUM_IMAGES) {
+				printf("ImageManager::add_image: byte image limit reached %d, skipping '%s'\n",
+				       TEX_NUM_IMAGES, filename.c_str());
 				return -1;
+			}
 
 			images.resize(images.size() + 1);
 		}
@@ -353,13 +359,13 @@
 			device->tex_free(tex_img);
 
 		if(!file_load_float_image(img, tex_img)) {
-			/* on failure to load, we set a 1x1 pixels black image */
+			/* on failure to load, we set a 1x1 pixels pink image */
 			float *pixels = (float*)tex_img.resize(1, 1);
 
-			pixels[0] = 0.0f;
-			pixels[1] = 0.0f;
-			pixels[2] = 0.0f;
-			pixels[3] = 0.0f;
+			pixels[0] = TEX_IMAGE_MISSING_R;
+			pixels[1] = TEX_IMAGE_MISSING_G;
+			pixels[2] = TEX_IMAGE_MISSING_B;
+			pixels[3] = TEX_IMAGE_MISSING_A;
 		}
 
 		string name;
@@ -380,13 +386,13 @@
 			device->tex_free(tex_img);
 
 		if(!file_load_image(img, tex_img)) {
-			/* on failure to load, we set a 1x1 pixels black image */
+			/* on failure to load, we set a 1x1 pixels pink image */
 			uchar *pixels = (uchar*)tex_img.resize(1, 1);
 
-			pixels[0] = 0;
-			pixels[1] = 0;
-			pixels[2] = 0;
-			pixels[3] = 0;
+			pixels[0] = (TEX_IMAGE_MISSING_R * 255);
+			pixels[1] = (TEX_IMAGE_MISSING_G * 255);
+			pixels[2] = (TEX_IMAGE_MISSING_B * 255);
+			pixels[3] = (TEX_IMAGE_MISSING_A * 255);
 		}
 
 		string name;

Modified: branches/soc-2011-tomato/intern/cycles/render/image.h
===================================================================
--- branches/soc-2011-tomato/intern/cycles/render/image.h	2012-07-04 11:48:42 UTC (rev 48585)
+++ branches/soc-2011-tomato/intern/cycles/render/image.h	2012-07-04 11:53:48 UTC (rev 48586)
@@ -31,6 +31,12 @@
 #define TEX_IMAGE_MAX			(TEX_NUM_IMAGES + TEX_NUM_FLOAT_IMAGES)
 #define TEX_IMAGE_FLOAT_START	TEX_NUM_IMAGES
 
+/* color to use when textures are not found */
+#define TEX_IMAGE_MISSING_R 1
+#define TEX_IMAGE_MISSING_G 0
+#define TEX_IMAGE_MISSING_B 1
+#define TEX_IMAGE_MISSING_A 1
+
 class Device;
 class DeviceScene;
 class Progress;

Modified: branches/soc-2011-tomato/intern/cycles/render/nodes.cpp
===================================================================
--- branches/soc-2011-tomato/intern/cycles/render/nodes.cpp	2012-07-04 11:48:42 UTC (rev 48585)
+++ branches/soc-2011-tomato/intern/cycles/render/nodes.cpp	2012-07-04 11:53:48 UTC (rev 48586)
@@ -184,10 +184,12 @@
 		/* image not found */
 		if(!color_out->links.empty()) {
 			compiler.add_node(NODE_VALUE_V, color_out->stack_offset);
-			compiler.add_node(NODE_VALUE_V, make_float3(0, 0, 0));
+			compiler.add_node(NODE_VALUE_V, make_float3(TEX_IMAGE_MISSING_R,
+			                                            TEX_IMAGE_MISSING_G,
+			                                            TEX_IMAGE_MISSING_B));
 		}
 		if(!alpha_out->links.empty())
-			compiler.add_node(NODE_VALUE_F, __float_as_int(0.0f), alpha_out->stack_offset);
+			compiler.add_node(NODE_VALUE_F, __float_as_int(TEX_IMAGE_MISSING_A), alpha_out->stack_offset);
 	}
 }
 
@@ -288,10 +290,12 @@
 		/* image not found */
 		if(!color_out->links.empty()) {
 			compiler.add_node(NODE_VALUE_V, color_out->stack_offset);
-			compiler.add_node(NODE_VALUE_V, make_float3(0, 0, 0));
+			compiler.add_node(NODE_VALUE_V, make_float3(TEX_IMAGE_MISSING_R,
+			                                            TEX_IMAGE_MISSING_G,
+			                                            TEX_IMAGE_MISSING_B));
 		}
 		if(!alpha_out->links.empty())
-			compiler.add_node(NODE_VALUE_F, __float_as_int(0.0f), alpha_out->stack_offset);
+			compiler.add_node(NODE_VALUE_F, __float_as_int(TEX_IMAGE_MISSING_A), alpha_out->stack_offset);
 	}
 }
 

Modified: branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_node.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_node.py	2012-07-04 11:48:42 UTC (rev 48585)
+++ branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_node.py	2012-07-04 11:53:48 UTC (rev 48586)
@@ -224,7 +224,7 @@
 class NODE_PT_quality(bpy.types.Panel):
     bl_space_type = 'NODE_EDITOR'
     bl_region_type = 'UI'
-    bl_label = "Quality"
+    bl_label = "Performance"
 
     @classmethod
     def poll(cls, context):
@@ -240,8 +240,10 @@
         layout.prop(tree, "edit_quality", text="Edit")
         layout.prop(tree, "chunk_size")
         layout.prop(tree, "use_opencl")
+        layout.prop(tree, "two_pass")
+        layout.prop(snode, "show_highlight")
+        
 
-
 class NODE_MT_node_color_presets(Menu):
     """Predefined node color"""
     bl_label = "Color Presets"

Modified: branches/soc-2011-tomato/source/blender/compositor/intern/COM_CompositorContext.cpp
===================================================================
--- branches/soc-2011-tomato/source/blender/compositor/intern/COM_CompositorContext.cpp	2012-07-04 11:48:42 UTC (rev 48585)
+++ branches/soc-2011-tomato/source/blender/compositor/intern/COM_CompositorContext.cpp	2012-07-04 11:53:48 UTC (rev 48586)
@@ -30,6 +30,7 @@
 	this->m_quality = COM_QUALITY_HIGH;
 	this->m_hasActiveOpenCLDevices = false;
 	this->m_activegNode = NULL;
+	this->m_fastCalculation = false;
 }
 
 const int CompositorContext::getFramenumber() const

Modified: branches/soc-2011-tomato/source/blender/compositor/intern/COM_CompositorContext.h
===================================================================
--- branches/soc-2011-tomato/source/blender/compositor/intern/COM_CompositorContext.h	2012-07-04 11:48:42 UTC (rev 48585)
+++ branches/soc-2011-tomato/source/blender/compositor/intern/COM_CompositorContext.h	2012-07-04 11:53:48 UTC (rev 48586)
@@ -73,6 +73,11 @@
 	 * @brief does this system have active opencl devices?
 	 */
 	bool m_hasActiveOpenCLDevices;
+	
+	/**
+	 * @brief Skip slow nodes
+	 */
+	bool m_fastCalculation;
 
 public:
 	/**
@@ -148,6 +153,9 @@
 	int getChunksize() { return this->getbNodeTree()->chunksize; }
 	
 	const int isColorManaged() const;
+	
+	void setFastCalculation(bool fastCalculation) {this->m_fastCalculation = fastCalculation;}
+	bool isFastCalculation() {return this->m_fastCalculation;}
 };
 
 

Modified: branches/soc-2011-tomato/source/blender/compositor/intern/COM_Converter.cpp
===================================================================
--- branches/soc-2011-tomato/source/blender/compositor/intern/COM_Converter.cpp	2012-07-04 11:48:42 UTC (rev 48585)
+++ branches/soc-2011-tomato/source/blender/compositor/intern/COM_Converter.cpp	2012-07-04 11:53:48 UTC (rev 48586)
@@ -118,7 +118,7 @@
 #include "COM_ViewerNode.h"
 #include "COM_ZCombineNode.h"
 
-Node *Converter::convert(bNode *b_node)
+Node *Converter::convert(bNode *b_node, bool fast)
 {
 	Node *node;
 
@@ -126,6 +126,22 @@
 		node = new MuteNode(b_node);
 		return node;
 	}
+	if (fast) {
+		if (b_node->type == CMP_NODE_BLUR ||
+		        b_node->type == CMP_NODE_VECBLUR ||
+		        b_node->type == CMP_NODE_BILATERALBLUR ||
+		        b_node->type == CMP_NODE_DEFOCUS ||
+		        b_node->type == CMP_NODE_BOKEHBLUR ||
+		        b_node->type == CMP_NODE_GLARE ||
+		        b_node->type == CMP_NODE_DBLUR ||
+		        b_node->type == CMP_NODE_MOVIEDISTORTION ||
+		        b_node->type == CMP_NODE_LENSDIST ||
+		        b_node->type == CMP_NODE_DOUBLEEDGEMASK ||
+		        b_node->type == CMP_NODE_DILATEERODE) 
+		{
+			return new MuteNode(b_node);
+		}
+	}
 
 	switch (b_node->type) {
 		case CMP_NODE_COMPOSITE:

Modified: branches/soc-2011-tomato/source/blender/compositor/intern/COM_Converter.h
===================================================================
--- branches/soc-2011-tomato/source/blender/compositor/intern/COM_Converter.h	2012-07-04 11:48:42 UTC (rev 48585)
+++ branches/soc-2011-tomato/source/blender/compositor/intern/COM_Converter.h	2012-07-04 11:53:48 UTC (rev 48586)
@@ -42,7 +42,7 @@
 	 * @see Node
 	 * @see MuteNode
 	 */
-	static Node *convert(bNode *b_node);
+	static Node *convert(bNode *b_node, bool fast);
 	
 	/**
 	 * @brief This method will add a datetype conversion rule when the to-socket does not support the from-socket actual data type.

Modified: branches/soc-2011-tomato/source/blender/compositor/intern/COM_ExecutionGroup.cpp
===================================================================
--- branches/soc-2011-tomato/source/blender/compositor/intern/COM_ExecutionGroup.cpp	2012-07-04 11:48:42 UTC (rev 48585)
+++ branches/soc-2011-tomato/source/blender/compositor/intern/COM_ExecutionGroup.cpp	2012-07-04 11:53:48 UTC (rev 48586)
@@ -27,6 +27,8 @@
 
 #include "BLI_math.h"
 #include "PIL_time.h"
+#include "WM_api.h"
+#include "WM_types.h"
 
 #include "COM_ExecutionGroup.h"
 #include "COM_InputSocket.h"
@@ -347,6 +349,8 @@
 				finished = false;
 				startEvaluated = true;
 				numberEvaluated++;
+

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list