Undo: support implicit-sharing in memfile undo step #106903

Merged
Jacques Lucke merged 78 commits from JacquesLucke/blender:implicit-sharing-undo into main 2024-02-29 17:15:09 +01:00
1 changed files with 2 additions and 0 deletions
Showing only changes of commit 7e783f8452 - Show all commits

View File

@ -2483,6 +2483,7 @@ static void customData_free_layer__internal(CustomDataLayer *layer, const int to
}
else {
layer->implicit_sharing_info->remove_user_and_delete_if_last();
layer->implicit_sharing_info = nullptr;
}
}
@ -5199,6 +5200,7 @@ void CustomData_blend_read(BlendDataReader *reader, CustomData *data, const int
if (layer->flag & CD_FLAG_EXTERNAL) {
layer->flag &= ~CD_FLAG_IN_MEMORY;
}
layer->implicit_sharing_info = nullptr;
if (CustomData_verify_versions(data, i)) {
BLO_read_data_address(reader, &layer->data);