[Bf-blender-cvs] [e81533b25e6] master: Cleanup: Simplify compositor Z Combine operation conversion

Aaron Carlisle noreply at git.blender.org
Wed Sep 29 00:46:17 CEST 2021


Commit: e81533b25e6bcaf703d8b9961fec89eae62dcb9c
Author: Aaron Carlisle
Date:   Tue Sep 28 18:45:53 2021 -0400
Branches: master
https://developer.blender.org/rBe81533b25e6bcaf703d8b9961fec89eae62dcb9c

Cleanup: Simplify compositor Z Combine operation conversion

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

M	source/blender/compositor/nodes/COM_ZCombineNode.cc

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

diff --git a/source/blender/compositor/nodes/COM_ZCombineNode.cc b/source/blender/compositor/nodes/COM_ZCombineNode.cc
index e29748dc317..9753e812a8b 100644
--- a/source/blender/compositor/nodes/COM_ZCombineNode.cc
+++ b/source/blender/compositor/nodes/COM_ZCombineNode.cc
@@ -64,18 +64,14 @@ void ZCombineNode::convertToOperations(NodeConverter &converter,
     NodeOperation *maskoperation;
     if (this->getbNode()->custom1) {
       maskoperation = new MathGreaterThanOperation();
-      converter.addOperation(maskoperation);
-
-      converter.mapInputSocket(getInputSocket(1), maskoperation->getInputSocket(0));
-      converter.mapInputSocket(getInputSocket(3), maskoperation->getInputSocket(1));
     }
     else {
       maskoperation = new MathLessThanOperation();
-      converter.addOperation(maskoperation);
-
-      converter.mapInputSocket(getInputSocket(1), maskoperation->getInputSocket(0));
-      converter.mapInputSocket(getInputSocket(3), maskoperation->getInputSocket(1));
     }
+    converter.addOperation(maskoperation);
+
+    converter.mapInputSocket(getInputSocket(1), maskoperation->getInputSocket(0));
+    converter.mapInputSocket(getInputSocket(3), maskoperation->getInputSocket(1));
 
     /* Step 2 anti alias mask bit of an expensive operation, but does the trick. */
     AntiAliasOperation *antialiasoperation = new AntiAliasOperation();



More information about the Bf-blender-cvs mailing list