[Bf-blender-cvs] [6f0aca79734] master: Fix T78264: Auto Render stops working after rendering manually

Sergey Sharybin noreply at git.blender.org
Wed Jul 1 15:08:19 CEST 2020


Commit: 6f0aca79734834a75033b128954d5c44a9541fdd
Author: Sergey Sharybin
Date:   Wed Jul 1 12:52:58 2020 +0200
Branches: master
https://developer.blender.org/rB6f0aca79734834a75033b128954d5c44a9541fdd

Fix T78264: Auto Render stops working after rendering manually

Was caused by weird and feedback-loop based issue from a long time ago.

The auto-render was only happening for nodes which are tagged for exec.
This tag is assigned by edit operations on the tree (for example, when
adding or removing links). It is also set in the render pipeline for
nodes which are to be executed.

The issues comes from the fact that "life updates" during editing did
not clear the need_exec flag, ever. This made it so Auto Render was
working as expected. However, rendering the scene resets need_exec
flags at the end of rendering using ntreeCompositClearTags().
The actual need of such clear is not very clear, but it was making it
so Auto Render does not work after render.

To my knowledge the flag didn't really meant that the node is connected
to the output, so it couldn't have acted as attempt to ignore rendering
of an unused scene. It also should be possible to auto-render even if
node tree itself was never altered.

Long story short: lets ignore need_exec flag in auto-render check and
render scene node if the scene is used by the node.

Differential Revision: https://developer.blender.org/D8171

===================================================================

M	source/blender/editors/space_node/node_edit.c

===================================================================

diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index ac58ec1e636..11d87148713 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -1428,11 +1428,15 @@ int node_render_changed_exec(bContext *C, wmOperator *UNUSED(op))
   Scene *sce = CTX_data_scene(C);
   bNode *node;
 
+  /* This is actually a test whether scene is used by the compositor or not.
+   * All the nodes are using same render result, so there is no need to do
+   * anything smart about check how exactly scene is used. */
   for (node = sce->nodetree->nodes.first; node; node = node->next) {
-    if (node->id == (ID *)sce && node->need_exec) {
+    if (node->id == (ID *)sce) {
       break;
     }
   }
+
   if (node) {
     ViewLayer *view_layer = BLI_findlink(&sce->view_layers, node->custom1);



More information about the Bf-blender-cvs mailing list