27 if (id_field_input ==
nullptr && index_field_input ==
nullptr) {
51 if (list->
size() >= dst_size) {
54 if (
const auto *
data = std::get_if<nodes::List::ArrayData>(&list->
data())) {
65 if (last_chunk_size > 0) {
71 return List::create(cpp_type, std::move(new_data), dst_size);
73 if (
const auto *
data = std::get_if<nodes::List::SingleData>(&list->
data())) {
82 const mf::ParamType ¶m_type,
85 const CPPType &cpp_type = param_type.data_type().single_type();
87 if (
const auto *array_data = std::get_if<nodes::List::ArrayData>(&list.
data())) {
88 params.add_readonly_single_input(
GSpan(cpp_type, array_data->data, list.
size()));
90 else if (
const auto *single_data = std::get_if<nodes::List::SingleData>(&list.
data())) {
91 params.add_readonly_single_input(
GPointer(cpp_type, single_data->value));
105 max_size = std::max(max_size, list->size());
112 mf::ContextBuilder context;
113 context.user_data(user_data);
117 const mf::ParamType param_type =
fn.param_type(
params.next_param_index());
118 const CPPType &cpp_type = param_type.data_type().single_type();
124 else if (input_variant.
is_list()) {
126 if (!list_ptr || list_ptr->
size() == 0) {
145 if (output_values[
i] ==
nullptr) {
146 params.add_ignored_single_output(
"");
150 const mf::ParamType param_type =
fn.param_type(
params.next_param_index());
151 const CPPType &cpp_type = param_type.data_type().single_type();
155 output_variant.
set(
List::create(cpp_type, std::move(array_data), max_size));
#define BLI_assert_unreachable()
#define POINTER_OFFSET(v, ofs)
BMesh const char void * data
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
void copy_construct_n(const void *src, void *dst, int64_t n) const
const void * default_value() const
constexpr int64_t size() const
constexpr IndexRange index_range() const
bool is_context_dependent_field() const
const void * get_single_ptr_raw() const
int add_with_destination(GField field, GVMutableArray dst)
const CPPType & cpp_type() const
ListFieldContext()=default
GVArray get_varray_for_input(const FieldInput &field_input, const IndexMask &mask, ResourceScope &) const override
static ArrayData ForConstructed(const CPPType &type, int64_t size)
static ArrayData ForUninitialized(const CPPType &type, int64_t size)
const DataVariant & data() const
static ListPtr create(const CPPType &type, DataVariant data, const int64_t size)
const CPPType & cpp_type() const
ccl_device_inline float2 mask(const MaskType mask, const float2 a)
ListPtr evaluate_field_to_list(GField field, const int64_t count)
ImplicitSharingPtr< List > ListPtr
void execute_multi_function_on_value_variant__list(const MultiFunction &fn, const Span< SocketValueVariant * > input_values, const Span< SocketValueVariant * > output_values, GeoNodesUserData *user_data)
static ListPtr create_repeated_list(ListPtr list, const int64_t dst_size)
static void add_list_to_params(mf::ParamsBuilder ¶ms, const mf::ParamType ¶m_type, const List &list)