[Bf-blender-cvs] [55a74c35dd9] functions: fix vector math node

Jacques Lucke noreply at git.blender.org
Tue Jul 16 18:20:24 CEST 2019


Commit: 55a74c35dd99630c82a05ed2c805a378cda3d143
Author: Jacques Lucke
Date:   Tue Jul 16 15:59:42 2019 +0200
Branches: functions
https://developer.blender.org/rB55a74c35dd99630c82a05ed2c805a378cda3d143

fix vector math node

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

M	source/blender/functions/frontends/data_flow_nodes/inserters/nodes.cpp

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

diff --git a/source/blender/functions/frontends/data_flow_nodes/inserters/nodes.cpp b/source/blender/functions/frontends/data_flow_nodes/inserters/nodes.cpp
index 18052154f61..9b758174552 100644
--- a/source/blender/functions/frontends/data_flow_nodes/inserters/nodes.cpp
+++ b/source/blender/functions/frontends/data_flow_nodes/inserters/nodes.cpp
@@ -23,7 +23,13 @@ static SharedFunction get_vectorized_function(SharedFunction &original_fn,
                                               ArrayRef<AutoVectorizedInput> auto_vectorized_inputs,
                                               bool use_cache = true)
 {
+#if DEBUG
   BLI_assert(original_fn->input_amount() == auto_vectorized_inputs.size());
+  for (uint i = 0; i < original_fn->input_amount(); i++) {
+    BLI_assert(original_fn->input_type(i) ==
+               auto_vectorized_inputs[i].default_value_builder->output_type(0));
+  }
+#endif
 
   SmallVector<bool> vectorized_inputs;
   SmallVector<SharedFunction> used_default_value_builders;
@@ -123,8 +129,8 @@ static void INSERT_vector_math(BTreeGraphBuilder &builder, bNode *bnode)
   SharedFunction fn = get_vectorized_function(
       get_vector_math_function(operation),
       rna,
-      {{"use_list__a", Functions::GET_FN_output_float_0()},
-       {"use_list__b", Functions::GET_FN_output_float_0()}});
+      {{"use_list__a", Functions::GET_FN_output_float3_0()},
+       {"use_list__b", Functions::GET_FN_output_float3_0()}});
   builder.insert_matching_function(fn, bnode);
 }



More information about the Bf-blender-cvs mailing list