diff options
Diffstat (limited to 'source/blender/functions/intern')
-rw-r--r-- | source/blender/functions/intern/field.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/functions/intern/field.cc b/source/blender/functions/intern/field.cc index 1f7bad134a8..c6125b65c5e 100644 --- a/source/blender/functions/intern/field.cc +++ b/source/blender/functions/intern/field.cc @@ -519,17 +519,22 @@ IndexFieldInput::IndexFieldInput() : FieldInput(CPPType::get<int>(), "Index") { } -const GVArray *IndexFieldInput::get_varray_for_context(const fn::FieldContext &UNUSED(context), - IndexMask mask, - ResourceScope &scope) const +GVArray *IndexFieldInput::get_index_varray(IndexMask mask, ResourceScope &scope) { - /* TODO: Investigate a similar method to IndexRange::as_span() */ auto index_func = [](int i) { return i; }; return &scope.construct< fn::GVArray_For_EmbeddedVArray<int, VArray_For_Func<int, decltype(index_func)>>>( mask.min_array_size(), mask.min_array_size(), index_func); } +const GVArray *IndexFieldInput::get_varray_for_context(const fn::FieldContext &UNUSED(context), + IndexMask mask, + ResourceScope &scope) const +{ + /* TODO: Investigate a similar method to IndexRange::as_span() */ + return get_index_varray(mask, scope); +} + uint64_t IndexFieldInput::hash() const { /* Some random constant hash. */ |