// It thing for smooth node // in_ is VArray of input field Array access_mask(in_.size(), false); Array swap_buffer_a(is_.size()); Array swap_buffer_b(is_.size()); bool swap_flag = true; VArray field_access = blender::VArray::ForFunc(in_.size(), [access_mask, swap_buffer_a, swap_buffer_b, swap_flag, in_](const int index){ if (access_mask[index]){ if (swap_flag) { return swap_buffer_a[index]; }else{ return swap_buffer_b[index]; } }else{ swap_buffer_a[index] = in[in_]; // Mean that the entire buffer will be filled on the first loop // I will be read/write A and B buffer after i write one of this access_mask[index] = true; return swap_buffer_a[index]; } }); ... // And so... i can just return this like VArray as final field? if (swap_flag) { // for no make finalaze of all elements by myself return blender::VArray::ForFunc(in_.size(), [access_mask, swap_buffer_a, in_](const int index){ if (access_mask[index]){ return swap_buffer_a[index]; }else{ return in_[index]; } }); }else{ return blender::VArray::ForFunc(in_.size(), [access_mask, swap_buffer_b, in_](const int index){ if (access_mask[index]){ return swap_buffer_b[index]; }else{ return in_[index]; } }); }