[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40952] trunk/blender/source/blender/nodes /intern/node_exec.c: Fix for #28886, compositor cache regression bug.

Lukas Toenne lukas.toenne at googlemail.com
Wed Oct 12 14:55:32 CEST 2011


Revision: 40952
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40952
Author:   lukastoenne
Date:     2011-10-12 12:55:32 +0000 (Wed, 12 Oct 2011)
Log Message:
-----------
Fix for #28886, compositor cache regression bug.

The problem was that all outputs got tagged indiscriminately (esp. hidden render layer sockets), leading to full recalculation every time. This was caused by erroneous tagging of bNodeStacks with hasinput/hasoutput flags. This patch restores the old behaviour of tagging all non-static stacks as input values and all outputs that are connected to some input. Only difference is in node groups, where the hasoutput flag is no longer abused for tagging internal buffers, here the is_copy flag is used instead.

Modified Paths:
--------------
    trunk/blender/source/blender/nodes/intern/node_exec.c

Modified: trunk/blender/source/blender/nodes/intern/node_exec.c
===================================================================
--- trunk/blender/source/blender/nodes/intern/node_exec.c	2011-10-12 12:49:45 UTC (rev 40951)
+++ trunk/blender/source/blender/nodes/intern/node_exec.c	2011-10-12 12:55:32 UTC (rev 40952)
@@ -174,11 +174,13 @@
 	exec->stacksize = index;
 	exec->stack = MEM_callocN(exec->stacksize * sizeof(bNodeStack), "bNodeStack");
 	
+	/* all non-const results are considered inputs */
+	for (n=0; n < exec->stacksize; ++n)
+		exec->stack[n].hasinput = 1;
+	
 	/* prepare group tree inputs */
 	for (sock=ntree->inputs.first; sock; sock=sock->next) {
 		ns = setup_stack(exec->stack, sock);
-		if (ns->hasoutput)
-			ns->hasinput = 1;
 	}
 	/* prepare all internal nodes for execution */
 	for(n=0, nodeexec= exec->nodeexec; n < totnodes; ++n, ++nodeexec) {
@@ -191,14 +193,12 @@
 				node->need_exec= 0;
 			
 			ns = setup_stack(exec->stack, sock);
-			if (ns->hasoutput)
-				ns->hasinput = 1;
+			ns->hasoutput = 1;
 		}
 		
 		/* tag all outputs */
 		for (sock=node->outputs.first; sock; sock=sock->next) {
 			ns = setup_stack(exec->stack, sock);
-			ns->hasoutput = 1;
 		}
 		
 		if(node->typeinfo->initexecfunc)




More information about the Bf-blender-cvs mailing list