[Bf-blender-cvs] [65237b2346e] functions: support deduplicating vectorized nodes

Jacques Lucke noreply at git.blender.org
Sun Jan 19 12:46:03 CET 2020


Commit: 65237b2346e6cfe78cfc3fd0196f4ef58e7a5dff
Author: Jacques Lucke
Date:   Sun Jan 19 11:39:00 2020 +0100
Branches: functions
https://developer.blender.org/rB65237b2346e6cfe78cfc3fd0196f4ef58e7a5dff

support deduplicating vectorized nodes

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

M	source/blender/functions/intern/multi_functions/vectorize.cc

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

diff --git a/source/blender/functions/intern/multi_functions/vectorize.cc b/source/blender/functions/intern/multi_functions/vectorize.cc
index fa525ca75fc..90a082d41ea 100644
--- a/source/blender/functions/intern/multi_functions/vectorize.cc
+++ b/source/blender/functions/intern/multi_functions/vectorize.cc
@@ -1,6 +1,7 @@
 #include "vectorize.h"
 
 #include "BLI_array_cxx.h"
+#include "BLI_rand_cxx.h"
 
 namespace FN {
 
@@ -50,6 +51,12 @@ MF_SimpleVectorize::MF_SimpleVectorize(const MultiFunction &function,
       }
     }
   }
+
+  Optional<uint32_t> maybe_hash = function.operation_hash();
+  if (maybe_hash.has_value()) {
+    uint32_t vectorize_operation_hash = *maybe_hash * BLI_RAND_PER_LINE_UINT32;
+    signature.operation_hash(vectorize_operation_hash);
+  }
 }
 
 static void get_vectorization_lengths(IndexMask mask,



More information about the Bf-blender-cvs mailing list