From 32f101c6038b83256fc505b5f06018296f4fe446 Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Fri, 3 Sep 2021 11:55:22 +0200 Subject: add initial Attribute Freeze node --- source/blender/functions/FN_field.hh | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source/blender/functions') diff --git a/source/blender/functions/FN_field.hh b/source/blender/functions/FN_field.hh index d639b355ab9..29bb2cc25ba 100644 --- a/source/blender/functions/FN_field.hh +++ b/source/blender/functions/FN_field.hh @@ -307,6 +307,17 @@ class FieldEvaluator : NonMovable, NonCopyable { return this->add_with_destination(GField(std::move(field)), generic_dst_hint); } + int add(GField field, const GVArray **varray_ptr) + { + const int field_index = fields_to_evaluate_.append_and_get_index(std::move(field)); + dst_hints_.append(nullptr); + output_pointer_infos_.append(OutputPointerInfo{ + varray_ptr, [](void *dst, const GVArray &varray, ResourceScope &UNUSED(scope)) { + *(const GVArray **)dst = &varray; + }}); + return field_index; + } + /** * \param field: Field to add to the evaluator. * \param varray_ptr: Once #evaluate is called, the resulting virtual array will be will be -- cgit v1.2.3