Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2021-05-13 14:23:53 +0300
committerJacques Lucke <jacques@blender.org>2021-05-13 14:23:53 +0300
commit522868001c5bc1f6f4a8dc214202896224f2fc70 (patch)
tree15c2352b35e3fbf7f62d6172a91bb8c8c2a1bb6f /source/blender/functions/FN_multi_function_params.hh
parent8b87fc1c77f7f87434c226d3931635f5896d0c93 (diff)
Functions: simplify adding a single input to a multi-function
This is used by the upcoming new geometry nodes evaluator.
Diffstat (limited to 'source/blender/functions/FN_multi_function_params.hh')
-rw-r--r--source/blender/functions/FN_multi_function_params.hh7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/functions/FN_multi_function_params.hh b/source/blender/functions/FN_multi_function_params.hh
index 3b15f0278f3..e292d11def7 100644
--- a/source/blender/functions/FN_multi_function_params.hh
+++ b/source/blender/functions/FN_multi_function_params.hh
@@ -27,6 +27,7 @@
#include "BLI_resource_scope.hh"
+#include "FN_generic_pointer.hh"
#include "FN_generic_vector_array.hh"
#include "FN_generic_virtual_vector_array.hh"
#include "FN_multi_function_signature.hh"
@@ -64,6 +65,12 @@ class MFParamsBuilder {
this->add_readonly_single_input(scope_.construct<GVArray_For_GSpan>(__func__, span),
expected_name);
}
+ void add_readonly_single_input(GPointer value, StringRef expected_name = "")
+ {
+ this->add_readonly_single_input(scope_.construct<GVArray_For_SingleValueRef>(
+ __func__, *value.type(), min_array_size_, value.get()),
+ expected_name);
+ }
void add_readonly_single_input(const GVArray &ref, StringRef expected_name = "")
{
this->assert_current_param_type(MFParamType::ForSingleInput(ref.type()), expected_name);