Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2020-07-01 13:52:58 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2020-07-01 16:08:16 +0300
commit6f0aca79734834a75033b128954d5c44a9541fdd (patch)
treeda01e9d2e8f4934a610bc30187a1a8922d5ba9c0
parent6a302e6845e193aab8946947df53b0b2c7a1b70f (diff)
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
-rw-r--r--source/blender/editors/space_node/node_edit.c6
1 files changed, 5 insertions, 1 deletions
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);