[Bf-blender-cvs] [477d15998c7] functions: add utility function

Jacques Lucke noreply at git.blender.org
Mon Jan 27 23:37:07 CET 2020


Commit: 477d15998c77621875e2716f56a2b1d0ceefa7af
Author: Jacques Lucke
Date:   Mon Jan 27 23:04:02 2020 +0100
Branches: functions
https://developer.blender.org/rB477d15998c77621875e2716f56a2b1d0ceefa7af

add utility function

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

M	source/blender/functions/FN_multi_function.h

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

diff --git a/source/blender/functions/FN_multi_function.h b/source/blender/functions/FN_multi_function.h
index b6a02ee30c7..33022b710b5 100644
--- a/source/blender/functions/FN_multi_function.h
+++ b/source/blender/functions/FN_multi_function.h
@@ -291,6 +291,12 @@ class MFParamsBuilder {
     BLI_assert(array.size() >= m_min_array_size);
     this->add_single_output(GenericMutableArrayRef(array));
   }
+  template<typename T> void add_single_output(T *value)
+  {
+    BLI_assert(m_min_array_size == 1);
+    BLI_assert(value != nullptr);
+    this->add_single_output(GenericMutableArrayRef(CPP_TYPE<T>(), (void *)value, 1));
+  }
   void add_single_output(GenericMutableArrayRef array)
   {
     this->assert_current_param_type(MFParamType::ForSingleOutput(array.type()));



More information about the Bf-blender-cvs mailing list