[Bf-blender-cvs] [5a13cec6b9b] compositor-full-frame: Compositor: Enable can_be_constant on vector nodes

Manuel Castilla noreply at git.blender.org
Mon Aug 16 19:43:44 CEST 2021


Commit: 5a13cec6b9b4e97cc68d597c9b5e131f32a61bac
Author: Manuel Castilla
Date:   Mon Aug 16 18:26:08 2021 +0200
Branches: compositor-full-frame
https://developer.blender.org/rB5a13cec6b9b4e97cc68d597c9b5e131f32a61bac

Compositor: Enable can_be_constant on vector nodes

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

M	source/blender/compositor/operations/COM_DotproductOperation.cc
M	source/blender/compositor/operations/COM_MapRangeOperation.cc
M	source/blender/compositor/operations/COM_MapValueOperation.cc
M	source/blender/compositor/operations/COM_NormalizeOperation.cc

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

diff --git a/source/blender/compositor/operations/COM_DotproductOperation.cc b/source/blender/compositor/operations/COM_DotproductOperation.cc
index 8d5bcc52746..875b161e208 100644
--- a/source/blender/compositor/operations/COM_DotproductOperation.cc
+++ b/source/blender/compositor/operations/COM_DotproductOperation.cc
@@ -28,6 +28,7 @@ DotproductOperation::DotproductOperation()
   this->setResolutionInputSocketIndex(0);
   this->m_input1Operation = nullptr;
   this->m_input2Operation = nullptr;
+  flags.can_be_constant = true;
 }
 void DotproductOperation::initExecution()
 {
diff --git a/source/blender/compositor/operations/COM_MapRangeOperation.cc b/source/blender/compositor/operations/COM_MapRangeOperation.cc
index 6700d8d06f9..82fb033bf24 100644
--- a/source/blender/compositor/operations/COM_MapRangeOperation.cc
+++ b/source/blender/compositor/operations/COM_MapRangeOperation.cc
@@ -30,6 +30,7 @@ MapRangeOperation::MapRangeOperation()
   this->addOutputSocket(DataType::Value);
   this->m_inputOperation = nullptr;
   this->m_useClamp = false;
+  flags.can_be_constant = true;
 }
 
 void MapRangeOperation::initExecution()
diff --git a/source/blender/compositor/operations/COM_MapValueOperation.cc b/source/blender/compositor/operations/COM_MapValueOperation.cc
index 73e812c9a65..94fecc3f49e 100644
--- a/source/blender/compositor/operations/COM_MapValueOperation.cc
+++ b/source/blender/compositor/operations/COM_MapValueOperation.cc
@@ -25,6 +25,7 @@ MapValueOperation::MapValueOperation()
   this->addInputSocket(DataType::Value);
   this->addOutputSocket(DataType::Value);
   this->m_inputOperation = nullptr;
+  flags.can_be_constant = true;
 }
 
 void MapValueOperation::initExecution()
diff --git a/source/blender/compositor/operations/COM_NormalizeOperation.cc b/source/blender/compositor/operations/COM_NormalizeOperation.cc
index 841b45d2786..c3e72d2575f 100644
--- a/source/blender/compositor/operations/COM_NormalizeOperation.cc
+++ b/source/blender/compositor/operations/COM_NormalizeOperation.cc
@@ -27,6 +27,7 @@ NormalizeOperation::NormalizeOperation()
   this->m_imageReader = nullptr;
   this->m_cachedInstance = nullptr;
   this->flags.complex = true;
+  flags.can_be_constant = true;
 }
 void NormalizeOperation::initExecution()
 {



More information about the Bf-blender-cvs mailing list