Functions: simplify adding a single input to a multi-function
This is used by the upcoming new geometry nodes evaluator.
This commit is contained in:
parent
8b87fc1c77
commit
522868001c
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue