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:
2017-06-14 22:33:04 +02:00
parent 5e485e34e8
commit 31437b0d4d
3 changed files with 3 additions and 3 deletions

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);