[Bf-blender-cvs] [0e7e7cf8afd] temp-compositor-single-threaded-operation: Fixing filter_denoise.blend test case.

Jeroen Bakker noreply at git.blender.org
Tue Apr 6 14:00:18 CEST 2021


Commit: 0e7e7cf8afdfb3720fa5d770137e0af5e4f3d2f8
Author: Jeroen Bakker
Date:   Tue Apr 6 13:57:37 2021 +0200
Branches: temp-compositor-single-threaded-operation
https://developer.blender.org/rB0e7e7cf8afdfb3720fa5d770137e0af5e4f3d2f8

Fixing filter_denoise.blend test case.

Issue was that the inpaint node was being isolated, and the denoise node
wasn't (yet) the inpaint node thought that the denoise node was the
write operator of the inpaint node. This isn't correct it should add a
new write buffer operator to store its result.

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

M	source/blender/compositor/intern/COM_NodeOperationBuilder.cc

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

diff --git a/source/blender/compositor/intern/COM_NodeOperationBuilder.cc b/source/blender/compositor/intern/COM_NodeOperationBuilder.cc
index 25572c91d69..df56bb2ede1 100644
--- a/source/blender/compositor/intern/COM_NodeOperationBuilder.cc
+++ b/source/blender/compositor/intern/COM_NodeOperationBuilder.cc
@@ -494,14 +494,19 @@ void NodeOperationBuilder::add_output_buffers(NodeOperation *operation,
   }
 
   WriteBufferOperation *writeOperation = nullptr;
+  /* Check if the current operation can handle writing to buffer.
+   * If this is the case we don't need to add a separate write buffer operation. */
   if (operation->get_flags().is_write_buffer_operation) {
     writeOperation = static_cast<WriteBufferOperation *>(operation);
     writeOperation->setbNodeTree(m_context->getbNodeTree());
   }
 
   for (NodeOperationInput *target : targets) {
-    /* try to find existing write buffer operation */
-    if (target->getOperation().get_flags().is_write_buffer_operation) {
+    /* Try to find existing write buffer operation. Don't select complex write buffer operation as
+     * they are complex operations that handle their own writing, but haven't been isolated with
+     * read operators. */
+    NodeOperationFlags target_flags = target->getOperation().get_flags();
+    if (target_flags.is_write_buffer_operation && !target_flags.complex) {
       BLI_assert(writeOperation == nullptr); /* there should only be one write op connected */
       writeOperation = (WriteBufferOperation *)(&target->getOperation());
     }



More information about the Bf-blender-cvs mailing list