WIP : Use an extra step of indirection in accessing CustomDataLayers via rna. #108319

Open
Martijn Versteegh wants to merge 3 commits from Baardaap/blender:fix_dangling_customdata_pointers into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 changed files with 1 additions and 2 deletions
Showing only changes of commit 3b94c39085 - Show all commits

View File

@ -2337,8 +2337,7 @@ CustomData CustomData_shallow_copy_remove_non_bmesh_attributes(const CustomData
dst.maxlayer = dst.totlayer = dst_layers.size();
memcpy(dst.layers, dst_layers.data(), dst_layers.as_span().size_in_bytes());
dst.layer_locator = static_cast<CustomDataLayer **>(MEM_malloc_arrayN(dst.totlayer, sizeof(CustomDataLayer *), __func__));
std::fill(dst.layer_locator, dst.layer_locator+dst.totlayer, nullptr);
dst.layer_locator = nullptr;
CustomData_update_typemap(&dst);