Fix three obvious mistakes in brush/mask/cachefile ID copying.
They were modifying some source ID prop, instead of copied version of it... Found while making all source of ID copying const. ;)
This commit is contained in:
@@ -195,7 +195,7 @@ Brush *BKE_brush_copy(Main *bmain, Brush *brush)
|
||||
brushn->curve = curvemapping_copy(brush->curve);
|
||||
|
||||
/* enable fake user by default */
|
||||
id_fake_user_set(&brush->id);
|
||||
id_fake_user_set(&brushn->id);
|
||||
|
||||
BKE_id_copy_ensure_local(bmain, &brush->id, &brushn->id);
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ CacheFile *BKE_cachefile_copy(Main *bmain, CacheFile *cache_file)
|
||||
CacheFile *new_cache_file = BKE_libblock_copy(bmain, &cache_file->id);
|
||||
new_cache_file->handle = NULL;
|
||||
|
||||
BLI_listbase_clear(&cache_file->object_paths);
|
||||
BLI_listbase_clear(&new_cache_file->object_paths);
|
||||
|
||||
BKE_id_copy_ensure_local(bmain, &cache_file->id, &new_cache_file->id);
|
||||
|
||||
|
||||
@@ -851,7 +851,7 @@ Mask *BKE_mask_copy(Main *bmain, Mask *mask)
|
||||
BKE_mask_layer_copy_list(&mask_new->masklayers, &mask->masklayers);
|
||||
|
||||
/* enable fake user by default */
|
||||
id_fake_user_set(&mask->id);
|
||||
id_fake_user_set(&mask_new->id);
|
||||
|
||||
BKE_id_copy_ensure_local(bmain, &mask->id, &mask_new->id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user