Changeset View
Changeset View
Standalone View
Standalone View
source/blender/functions/intern/field.cc
| Context not available. | |||||
| return scope_.add_value(indices_from_selection(*typed_varray)).as_span(); | return scope_.add_value(indices_from_selection(*typed_varray)).as_span(); | ||||
| } | } | ||||
| /* -------------------------------------------------------------------- | |||||
| * IndexFieldInput. | |||||
| */ | |||||
| 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() */ | |||||
| 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); | |||||
| } | |||||
| } // namespace blender::fn | } // namespace blender::fn | ||||
| Context not available. | |||||