diff options
Diffstat (limited to 'source/blender')
52 files changed, 103 insertions, 125 deletions
diff --git a/source/blender/blenkernel/BKE_library.h b/source/blender/blenkernel/BKE_library.h index f90222ea7c2..dcbe5703160 100644 --- a/source/blender/blenkernel/BKE_library.h +++ b/source/blender/blenkernel/BKE_library.h @@ -162,8 +162,9 @@ void BKE_id_clear_newpoin(struct ID *id); void BKE_id_make_local_generic(struct Main *bmain, struct ID *id, const bool id_in_mainlist, const bool lib_local); bool id_make_local(struct Main *bmain, struct ID *id, const bool test, const bool force_local); bool id_single_user(struct bContext *C, struct ID *id, struct PointerRNA *ptr, struct PropertyRNA *prop); -bool id_copy(struct Main *bmain, const struct ID *id, struct ID **newid, bool test); -bool BKE_id_copy_ex(struct Main *bmain, const struct ID *id, struct ID **r_newid, const int flag, const bool test); +bool BKE_id_copy_is_allowed(const struct ID *id); +bool id_copy(struct Main *bmain, const struct ID *id, struct ID **newid); +bool BKE_id_copy_ex(struct Main *bmain, const struct ID *id, struct ID **r_newid, const int flag); void BKE_id_swap(struct Main *bmain, struct ID *id_a, struct ID *id_b); void id_sort_by_name(struct ListBase *lb, struct ID *id); void BKE_id_expand_local(struct Main *bmain, struct ID *id); diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index 94343204718..b05089c3aa9 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -163,7 +163,7 @@ void BKE_action_copy_data(Main *UNUSED(bmain), bAction *act_dst, const bAction * bAction *BKE_action_copy(Main *bmain, const bAction *act_src) { bAction *act_copy; - BKE_id_copy_ex(bmain, &act_src->id, (ID **)&act_copy, 0, false); + BKE_id_copy_ex(bmain, &act_src->id, (ID **)&act_copy, 0); return act_copy; } diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index ff84838bfa3..81bf11e2cd7 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -284,8 +284,8 @@ AnimData *BKE_animdata_copy(Main *bmain, AnimData *adt, const int flag) /* make a copy of action - at worst, user has to delete copies... */ if (do_action) { BLI_assert(bmain != NULL); - BKE_id_copy_ex(bmain, (ID *)dadt->action, (ID **)&dadt->action, 0, false); - BKE_id_copy_ex(bmain, (ID *)dadt->tmpact, (ID **)&dadt->tmpact, 0, false); + BKE_id_copy_ex(bmain, (ID *)dadt->action, (ID **)&dadt->action, 0); + BKE_id_copy_ex(bmain, (ID *)dadt->tmpact, (ID **)&dadt->tmpact, 0); } else if (do_id_user) { id_us_plus((ID *)dadt->action); diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c index 7607f1749c5..00b0bcd391a 100644 --- a/source/blender/blenkernel/intern/armature.c +++ b/source/blender/blenkernel/intern/armature.c @@ -201,7 +201,7 @@ void BKE_armature_copy_data(Main *UNUSED(bmain), bArmature *arm_dst, const bArma bArmature *BKE_armature_copy(Main *bmain, const bArmature *arm) { bArmature *arm_copy; - BKE_id_copy_ex(bmain, &arm->id, (ID **)&arm_copy, 0, false); + BKE_id_copy_ex(bmain, &arm->id, (ID **)&arm_copy, 0); return arm_copy; } diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index 1732a134f1a..50ff972b774 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -590,7 +590,7 @@ void BKE_brush_copy_data(Main *UNUSED(bmain), Brush *brush_dst, const Brush *bru Brush *BKE_brush_copy(Main *bmain, const Brush *brush) { Brush *brush_copy; - BKE_id_copy_ex(bmain, &brush->id, (ID **)&brush_copy, 0, false); + BKE_id_copy_ex(bmain, &brush->id, (ID **)&brush_copy, 0); return brush_copy; } diff --git a/source/blender/blenkernel/intern/cachefile.c b/source/blender/blenkernel/intern/cachefile.c index b5d47bd901c..9a317ac9624 100644 --- a/source/blender/blenkernel/intern/cachefile.c +++ b/source/blender/blenkernel/intern/cachefile.c @@ -126,7 +126,7 @@ void BKE_cachefile_copy_data( CacheFile *BKE_cachefile_copy(Main *bmain, const CacheFile *cache_file) { CacheFile *cache_file_copy; - BKE_id_copy_ex(bmain, &cache_file->id, (ID **)&cache_file_copy, 0, false); + BKE_id_copy_ex(bmain, &cache_file->id, (ID **)&cache_file_copy, 0); return cache_file_copy; } diff --git a/source/blender/blenkernel/intern/camera.c b/source/blender/blenkernel/intern/camera.c index 2a8cf8cd4f2..4a52707456b 100644 --- a/source/blender/blenkernel/intern/camera.c +++ b/source/blender/blenkernel/intern/camera.c @@ -103,7 +103,7 @@ void BKE_camera_copy_data(Main *UNUSED(bmain), Camera *cam_dst, const Camera *ca Camera *BKE_camera_copy(Main *bmain, const Camera *cam) { Camera *cam_copy; - BKE_id_copy_ex(bmain, &cam->id, (ID **)&cam_copy, 0, false); + BKE_id_copy_ex(bmain, &cam->id, (ID **)&cam_copy, 0); return cam_copy; } diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c index 8dc3ef5d639..ffd5844de00 100644 --- a/source/blender/blenkernel/intern/collection.c +++ b/source/blender/blenkernel/intern/collection.c @@ -224,7 +224,7 @@ Collection *BKE_collection_copy(Main *bmain, Collection *parent, Collection *col } Collection *collection_new; - BKE_id_copy_ex(bmain, &collection->id, (ID **)&collection_new, 0, false); + BKE_id_copy_ex(bmain, &collection->id, (ID **)&collection_new, 0); id_us_min(&collection_new->id); /* Copying add one user by default, need to get rid of that one. */ /* Optionally add to parent. */ diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index d3e1a48dfd6..d49ba5b4567 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -206,7 +206,7 @@ void BKE_curve_copy_data(Main *bmain, Curve *cu_dst, const Curve *cu_src, const cu_dst->batch_cache = NULL; if (cu_src->key && (flag & LIB_ID_COPY_SHAPEKEY)) { - BKE_id_copy_ex(bmain, &cu_src->key->id, (ID **)&cu_dst->key, flag, false); + BKE_id_copy_ex(bmain, &cu_src->key->id, (ID **)&cu_dst->key, flag); } cu_dst->editnurb = NULL; @@ -216,7 +216,7 @@ void BKE_curve_copy_data(Main *bmain, Curve *cu_dst, const Curve *cu_src, const Curve *BKE_curve_copy(Main *bmain, const Curve *cu) { Curve *cu_copy; - BKE_id_copy_ex(bmain, &cu->id, (ID **)&cu_copy, LIB_ID_COPY_SHAPEKEY, false); + BKE_id_copy_ex(bmain, &cu->id, (ID **)&cu_copy, LIB_ID_COPY_SHAPEKEY); return cu_copy; } diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c index 877df8899ff..28cdf3b3b36 100644 --- a/source/blender/blenkernel/intern/displist.c +++ b/source/blender/blenkernel/intern/displist.c @@ -1001,8 +1001,7 @@ static void curve_calc_modifiers_post( Mesh *temp_mesh; BKE_id_copy_ex(NULL, &modified->id, (ID **)&temp_mesh, LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | - LIB_ID_CREATE_NO_DEG_TAG | LIB_ID_COPY_NO_PREVIEW, - false); + LIB_ID_CREATE_NO_DEG_TAG | LIB_ID_COPY_NO_PREVIEW); BKE_id_free(NULL, modified); modified = temp_mesh; @@ -1047,8 +1046,7 @@ static void curve_calc_modifiers_post( Mesh *temp_mesh; BKE_id_copy_ex(NULL, &modified->id, (ID **)&temp_mesh, LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | - LIB_ID_CREATE_NO_DEG_TAG | LIB_ID_COPY_NO_PREVIEW, - false); + LIB_ID_CREATE_NO_DEG_TAG | LIB_ID_COPY_NO_PREVIEW); BKE_id_free(NULL, modified); modified = temp_mesh; diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c index e1d906e09dc..c85616613ae 100644 --- a/source/blender/blenkernel/intern/gpencil.c +++ b/source/blender/blenkernel/intern/gpencil.c @@ -637,7 +637,7 @@ void BKE_gpencil_copy_data(bGPdata *gpd_dst, const bGPdata *gpd_src, const int U bGPdata *BKE_gpencil_copy(Main *bmain, const bGPdata *gpd) { bGPdata *gpd_copy; - BKE_id_copy_ex(bmain, &gpd->id, (ID **)&gpd_copy, 0, false); + BKE_id_copy_ex(bmain, &gpd->id, (ID **)&gpd_copy, 0); return gpd_copy; } @@ -662,7 +662,7 @@ bGPdata *BKE_gpencil_data_duplicate(Main *bmain, const bGPdata *gpd_src, bool in } else { BLI_assert(bmain != NULL); - BKE_id_copy_ex(bmain, &gpd_src->id, (ID **)&gpd_dst, 0, false); + BKE_id_copy_ex(bmain, &gpd_src->id, (ID **)&gpd_dst, 0); } /* Copy internal data (layers, etc.) */ diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 321d02e7dc3..54a0b4f8118 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -420,7 +420,7 @@ void BKE_image_copy_data(Main *UNUSED(bmain), Image *ima_dst, const Image *ima_s Image *BKE_image_copy(Main *bmain, const Image *ima) { Image *ima_copy; - BKE_id_copy_ex(bmain, &ima->id, (ID **)&ima_copy, 0, false); + BKE_id_copy_ex(bmain, &ima->id, (ID **)&ima_copy, 0); return ima_copy; } diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c index 84176824478..f4af951a9ab 100644 --- a/source/blender/blenkernel/intern/key.c +++ b/source/blender/blenkernel/intern/key.c @@ -179,7 +179,7 @@ void BKE_key_copy_data(Main *UNUSED(bmain), Key *key_dst, const Key *key_src, co Key *BKE_key_copy(Main *bmain, const Key *key) { Key *key_copy; - BKE_id_copy_ex(bmain, &key->id, (ID **)&key_copy, 0, false); + BKE_id_copy_ex(bmain, &key->id, (ID **)&key_copy, 0); return key_copy; } diff --git a/source/blender/blenkernel/intern/lamp.c b/source/blender/blenkernel/intern/lamp.c index c0fda14cc26..0ce48413af6 100644 --- a/source/blender/blenkernel/intern/lamp.c +++ b/source/blender/blenkernel/intern/lamp.c @@ -110,7 +110,7 @@ void BKE_lamp_copy_data(Main *bmain, Lamp *la_dst, const Lamp *la_src, const int if (la_src->nodetree) { /* Note: nodetree is *not* in bmain, however this specific case is handled at lower level * (see BKE_libblock_copy_ex()). */ - BKE_id_copy_ex(bmain, (ID *)la_src->nodetree, (ID **)&la_dst->nodetree, flag, false); + BKE_id_copy_ex(bmain, (ID *)la_src->nodetree, (ID **)&la_dst->nodetree, flag); } if ((flag & LIB_ID_COPY_NO_PREVIEW) == 0) { @@ -124,7 +124,7 @@ void BKE_lamp_copy_data(Main *bmain, Lamp *la_dst, const Lamp *la_src, const int Lamp *BKE_lamp_copy(Main *bmain, const Lamp *la) { Lamp *la_copy; - BKE_id_copy_ex(bmain, &la->id, (ID **)&la_copy, 0, false); + BKE_id_copy_ex(bmain, &la->id, (ID **)&la_copy, 0); return la_copy; } diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c index 20bd579c9ad..8aff7480568 100644 --- a/source/blender/blenkernel/intern/lattice.c +++ b/source/blender/blenkernel/intern/lattice.c @@ -277,7 +277,7 @@ void BKE_lattice_copy_data(Main *bmain, Lattice *lt_dst, const Lattice *lt_src, lt_dst->def = MEM_dupallocN(lt_src->def); if (lt_src->key && (flag & LIB_ID_COPY_SHAPEKEY)) { - BKE_id_copy_ex(bmain, <_src->key->id, (ID **)<_dst->key, flag, false); + BKE_id_copy_ex(bmain, <_src->key->id, (ID **)<_dst->key, flag); } if (lt_src->dvert) { @@ -292,7 +292,7 @@ void BKE_lattice_copy_data(Main *bmain, Lattice *lt_dst, const Lattice *lt_src, Lattice *BKE_lattice_copy(Main *bmain, const Lattice *lt) { Lattice *lt_copy; - BKE_id_copy_ex(bmain, <->id, (ID **)<_copy, LIB_ID_COPY_SHAPEKEY, false); + BKE_id_copy_ex(bmain, <->id, (ID **)<_copy, LIB_ID_COPY_SHAPEKEY); return lt_copy; } diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index cda2030a9ee..61fea4ba2b5 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -341,7 +341,7 @@ void BKE_id_make_local_generic(Main *bmain, ID *id, const bool id_in_mainlist, c ID *id_new; /* Should not fail in expected usecases, but id_copy does not copy Scene e.g. */ - if (id_copy(bmain, id, &id_new, false)) { + if (id_copy(bmain, id, &id_new)) { id_new->us = 0; /* setting newid is mandatory for complex make_lib_local logic... */ @@ -538,6 +538,16 @@ static void id_copy_clear_runtime_pointers(ID *id, int UNUSED(flag)) } } +bool BKE_id_copy_is_allowed(const ID *id) +{ +#define LIB_ID_TYPES_NOCOPY ID_LI, ID_SCR, ID_WM, /* Not supported */ \ + ID_IP /* Deprecated */ + + return !ELEM(GS(id->name), LIB_ID_TYPES_NOCOPY); + +#undef LIB_ID_TYPES_NOCOPY +} + /** * Generic entry point for copying a datablock (new API). * @@ -550,24 +560,17 @@ static void id_copy_clear_runtime_pointers(ID *id, int UNUSED(flag)) * \param id: Source datablock. * \param r_newid: Pointer to new (copied) ID pointer. * \param flag: Set of copy options, see DNA_ID.h enum for details (leave to zero for default, full copy). - * \param test: If set, do not do any copy, just test whether copy is supported. * \return False when copying that ID type is not supported, true otherwise. */ -/* XXX TODO remove test thing, *all* IDs should be copyable that way! */ -bool BKE_id_copy_ex(Main *bmain, const ID *id, ID **r_newid, const int flag, const bool test) +bool BKE_id_copy_ex(Main *bmain, const ID *id, ID **r_newid, const int flag) { -#define LIB_ID_TYPES_NOCOPY ID_LI, ID_SCR, ID_WM, /* Not supported */ \ - ID_IP /* Deprecated */ - - BLI_assert(test || (r_newid != NULL)); + BLI_assert(r_newid != NULL); /* Make sure destination pointer is all good. */ if ((flag & LIB_ID_CREATE_NO_ALLOCATE) == 0) { - if (r_newid != NULL) { - *r_newid = NULL; - } + *r_newid = NULL; } else { - if (r_newid != NULL && *r_newid != NULL) { + if (*r_newid != NULL) { /* Allow some garbage non-initialized memory to go in, and clean it up here. */ const size_t size = BKE_libblock_get_alloc_info(GS(id->name), NULL); memset(*r_newid, 0, size); @@ -578,12 +581,9 @@ bool BKE_id_copy_ex(Main *bmain, const ID *id, ID **r_newid, const int flag, con if (id == NULL) { return false; } - if (ELEM(GS(id->name), LIB_ID_TYPES_NOCOPY)) { + if (!BKE_id_copy_is_allowed(id)) { return false; } - else if (test) { - return true; - } BKE_libblock_copy_ex(bmain, id, r_newid, flag); @@ -713,9 +713,9 @@ bool BKE_id_copy_ex(Main *bmain, const ID *id, ID **r_newid, const int flag, con * Invokes the appropriate copy method for the block and returns the result in * newid, unless test. Returns true if the block can be copied. */ -bool id_copy(Main *bmain, const ID *id, ID **newid, bool test) +bool id_copy(Main *bmain, const ID *id, ID **newid) { - return BKE_id_copy_ex(bmain, id, newid, LIB_ID_COPY_SHAPEKEY, test); + return BKE_id_copy_ex(bmain, id, newid, LIB_ID_COPY_SHAPEKEY); } /** Does a mere memory swap over the whole IDs data (including type-specific memory). @@ -797,7 +797,7 @@ bool id_single_user(bContext *C, ID *id, PointerRNA *ptr, PropertyRNA *prop) /* if property isn't editable, we're going to have an extra block hanging around until we save */ if (RNA_property_editable(ptr, prop)) { Main *bmain = CTX_data_main(C); - if (id_copy(bmain, id, &newid, false) && newid) { + if (id_copy(bmain, id, &newid) && newid) { /* copy animation actions too */ BKE_animdata_copy_id_action(bmain, id, false); /* us is 1 by convention with new IDs, but RNA_property_pointer_set diff --git a/source/blender/blenkernel/intern/library_override.c b/source/blender/blenkernel/intern/library_override.c index 9bb9c2f9ae9..13e5748cfda 100644 --- a/source/blender/blenkernel/intern/library_override.c +++ b/source/blender/blenkernel/intern/library_override.c @@ -164,7 +164,7 @@ static ID *override_static_create_from(Main *bmain, ID *reference_id) { ID *local_id; - if (!id_copy(bmain, reference_id, (ID **)&local_id, false)) { + if (!id_copy(bmain, reference_id, (ID **)&local_id)) { return NULL; } id_us_min(local_id); @@ -621,7 +621,7 @@ void BKE_override_static_update(Main *bmain, ID *local) * a (performances) issue here. */ ID *tmp_id; - id_copy(bmain, local->override_static->reference, &tmp_id, false); + id_copy(bmain, local->override_static->reference, &tmp_id); if (tmp_id == NULL) { return; @@ -727,7 +727,7 @@ ID *BKE_override_static_operations_store_start(Main *bmain, OverrideStaticStorag /* This would imply change in handling of usercout all over RNA (and possibly all over Blender code). * Not impossible to do, but would rather see first is extra useless usual user handling is actually * a (performances) issue here, before doing it. */ - id_copy((Main *)override_storage, local, &storage_id, false); + id_copy((Main *)override_storage, local, &storage_id); if (storage_id != NULL) { PointerRNA rnaptr_reference, rnaptr_final, rnaptr_storage; diff --git a/source/blender/blenkernel/intern/lightprobe.c b/source/blender/blenkernel/intern/lightprobe.c index cb7f546a4b4..ca537ed3742 100644 --- a/source/blender/blenkernel/intern/lightprobe.c +++ b/source/blender/blenkernel/intern/lightprobe.c @@ -76,7 +76,7 @@ void BKE_lightprobe_copy_data( LightProbe *BKE_lightprobe_copy(Main *bmain, const LightProbe *probe) { LightProbe *probe_copy; - BKE_id_copy_ex(bmain, &probe->id, (ID **)&probe_copy, 0, false); + BKE_id_copy_ex(bmain, &probe->id, (ID **)&probe_copy, 0); return probe_copy; } diff --git a/source/blender/blenkernel/intern/linestyle.c b/source/blender/blenkernel/intern/linestyle.c index cf9a0dc0ef2..8f8a0759db4 100644 --- a/source/blender/blenkernel/intern/linestyle.c +++ b/source/blender/blenkernel/intern/linestyle.c @@ -170,7 +170,7 @@ void BKE_linestyle_copy_data( if (linestyle_src->nodetree) { /* Note: nodetree is *not* in bmain, however this specific case is handled at lower level * (see BKE_libblock_copy_ex()). */ - BKE_id_copy_ex(bmain, (ID *)linestyle_src->nodetree, (ID **)&linestyle_dst->nodetree, flag, false); + BKE_id_copy_ex(bmain, (ID *)linestyle_src->nodetree, (ID **)&linestyle_dst->nodetree, flag); } LineStyleModifier *m; @@ -195,7 +195,7 @@ void BKE_linestyle_copy_data( FreestyleLineStyle *BKE_linestyle_copy(struct Main *bmain, const FreestyleLineStyle *linestyle) { FreestyleLineStyle *linestyle_copy; - BKE_id_copy_ex(bmain, &linestyle->id, (ID **)&linestyle_copy, 0, false); + BKE_id_copy_ex(bmain, &linestyle->id, (ID **)&linestyle_copy, 0); return linestyle_copy; } diff --git a/source/blender/blenkernel/intern/mask.c b/source/blender/blenkernel/intern/mask.c index 7840ccc9a8c..d97f0bf2ce4 100644 --- a/source/blender/blenkernel/intern/mask.c +++ b/source/blender/blenkernel/intern/mask.c @@ -863,7 +863,7 @@ void BKE_mask_copy_data(Main *UNUSED(bmain), Mask *mask_dst, const Mask *mask_sr Mask *BKE_mask_copy(Main *bmain, const Mask *mask) { Mask *mask_copy; - BKE_id_copy_ex(bmain, &mask->id, (ID **)&mask_copy, 0, false); + BKE_id_copy_ex(bmain, &mask->id, (ID **)&mask_copy, 0); return mask_copy; } diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c index 17a26f1a4ba..a14e82d2962 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -184,7 +184,7 @@ void BKE_material_copy_data(Main *bmain, Material *ma_dst, const Material *ma_sr if (ma_src->nodetree) { /* Note: nodetree is *not* in bmain, however this specific case is handled at lower level * (see BKE_libblock_copy_ex()). */ - BKE_id_copy_ex(bmain, (ID *)ma_src->nodetree, (ID **)&ma_dst->nodetree, flag, false); + BKE_id_copy_ex(bmain, (ID *)ma_src->nodetree, (ID **)&ma_dst->nodetree, flag); } if ((flag & LIB_ID_COPY_NO_PREVIEW) == 0) { @@ -210,7 +210,7 @@ void BKE_material_copy_data(Main *bmain, Material *ma_dst, const Material *ma_sr Material *BKE_material_copy(Main *bmain, const Material *ma) { Material *ma_copy; - BKE_id_copy_ex(bmain, &ma->id, (ID **)&ma_copy, 0, false); + BKE_id_copy_ex(bmain, &ma->id, (ID **)&ma_copy, 0); return ma_copy; } diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c index bef52bd1418..e2b37050c63 100644 --- a/source/blender/blenkernel/intern/mball.c +++ b/source/blender/blenkernel/intern/mball.c @@ -116,7 +116,7 @@ void BKE_mball_copy_data(Main *UNUSED(bmain), MetaBall *mb_dst, const MetaBall * MetaBall *BKE_mball_copy(Main *bmain, const MetaBall *mb) { MetaBall *mb_copy; - BKE_id_copy_ex(bmain, &mb->id, (ID **)&mb_copy, 0, false); + BKE_id_copy_ex(bmain, &mb->id, (ID **)&mb_copy, 0); return mb_copy; } diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index 2adc2a5e609..2ecf4d7c484 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -572,7 +572,7 @@ void BKE_mesh_copy_data(Main *bmain, Mesh *me_dst, const Mesh *me_src, const int /* TODO Do we want to add flag to prevent this? */ if (me_src->key && (flag & LIB_ID_COPY_SHAPEKEY)) { - BKE_id_copy_ex(bmain, &me_src->key->id, (ID **)&me_dst->key, flag, false); + BKE_id_copy_ex(bmain, &me_src->key->id, (ID **)&me_dst->key, flag); } } @@ -701,14 +701,14 @@ Mesh *BKE_mesh_copy_for_eval(struct Mesh *source, bool reference) } Mesh *result; - BKE_id_copy_ex(NULL, &source->id, (ID **)&result, flags, false); + BKE_id_copy_ex(NULL, &source->id, (ID **)&result, flags); return result; } Mesh *BKE_mesh_copy(Main *bmain, const Mesh *me) { Mesh *me_copy; - BKE_id_copy_ex(bmain, &me->id, (ID **)&me_copy, LIB_ID_COPY_SHAPEKEY, false); + BKE_id_copy_ex(bmain, &me->id, (ID **)&me_copy, LIB_ID_COPY_SHAPEKEY); return me_copy; } diff --git a/source/blender/blenkernel/intern/mesh_convert.c b/source/blender/blenkernel/intern/mesh_convert.c index a61d9da2c70..b48ede55e52 100644 --- a/source/blender/blenkernel/intern/mesh_convert.c +++ b/source/blender/blenkernel/intern/mesh_convert.c @@ -863,7 +863,7 @@ Mesh *BKE_mesh_new_from_object( /* copies object and modifiers (but not the data) */ Object *tmpobj; /* TODO: make it temp copy outside bmain! */ - BKE_id_copy_ex(bmain, &ob->id, (ID **)&tmpobj, LIB_ID_COPY_CACHES | LIB_ID_CREATE_NO_DEG_TAG, false); + BKE_id_copy_ex(bmain, &ob->id, (ID **)&tmpobj, LIB_ID_COPY_CACHES | LIB_ID_CREATE_NO_DEG_TAG); tmpcu = (Curve *)tmpobj->data; /* Copy cached display list, it might be needed by the stack evaluation. @@ -884,7 +884,7 @@ Mesh *BKE_mesh_new_from_object( BKE_object_free_modifiers(tmpobj, 0); /* copies the data */ - BKE_id_copy_ex(bmain, ob->data, (ID **)©cu, LIB_ID_CREATE_NO_DEG_TAG, false); + BKE_id_copy_ex(bmain, ob->data, (ID **)©cu, LIB_ID_CREATE_NO_DEG_TAG); id_us_min(tmpobj->data); tmpobj->data = copycu; @@ -971,7 +971,7 @@ Mesh *BKE_mesh_new_from_object( if (cage) { /* copies the data */ Mesh *mesh = ob->data; - BKE_id_copy_ex(bmain, &mesh->id, (ID **)&tmpmesh, 0, false); + BKE_id_copy_ex(bmain, &mesh->id, (ID **)&tmpmesh, 0); /* XXX BKE_mesh_copy() already handles materials usercount. */ do_mat_id_data_us = false; } @@ -1146,8 +1146,7 @@ Mesh *BKE_mesh_create_derived_for_modifier( LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_DEG_TAG | - LIB_ID_COPY_NO_PREVIEW, - false); + LIB_ID_COPY_NO_PREVIEW); BKE_mesh_apply_vert_coords(result, deformedVerts); if (build_shapekey_layers) @@ -1162,8 +1161,7 @@ Mesh *BKE_mesh_create_derived_for_modifier( LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_DEG_TAG | - LIB_ID_COPY_NO_PREVIEW, - false); + LIB_ID_COPY_NO_PREVIEW); if (build_shapekey_layers) add_shapekey_layers(mesh_temp, me); diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c index c825d3b9561..1e86d82ad9b 100644 --- a/source/blender/blenkernel/intern/movieclip.c +++ b/source/blender/blenkernel/intern/movieclip.c @@ -1525,7 +1525,7 @@ void BKE_movieclip_copy_data(Main *UNUSED(bmain), MovieClip *clip_dst, const Mov MovieClip *BKE_movieclip_copy(Main *bmain, const MovieClip *clip) { MovieClip *clip_copy; - BKE_id_copy_ex(bmain, &clip->id, (ID **)&clip_copy, 0, false); + BKE_id_copy_ex(bmain, &clip->id, (ID **)&clip_copy, 0); return clip_copy; } diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c index 16eb1d2caa8..c6b82cf390e 100644 --- a/source/blender/blenkernel/intern/nla.c +++ b/source/blender/blenkernel/intern/nla.c @@ -184,7 +184,7 @@ NlaStrip *BKE_nlastrip_copy(Main *bmain, NlaStrip *strip, const bool use_same_ac } else { /* use a copy of the action instead (user count shouldn't have changed yet) */ - BKE_id_copy_ex(bmain, &strip_d->act->id, (ID **)&strip_d->act, flag, false); + BKE_id_copy_ex(bmain, &strip_d->act->id, (ID **)&strip_d->act, flag); } } diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index 295d63bb107..ffcd3ab591c 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -1378,7 +1378,7 @@ bNodeTree *ntreeCopyTree_ex(const bNodeTree *ntree, Main *bmain, const bool do_i { bNodeTree *ntree_copy; const int flag = do_id_user ? LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_MAIN : 0; - BKE_id_copy_ex(bmain, (ID *)ntree, (ID **)&ntree_copy, flag, false); + BKE_id_copy_ex(bmain, (ID *)ntree, (ID **)&ntree_copy, flag); return ntree_copy; } bNodeTree *ntreeCopyTree(Main *bmain, const bNodeTree *ntree) @@ -2038,8 +2038,7 @@ bNodeTree *ntreeLocalize(bNodeTree *ntree) (LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_COPY_NO_PREVIEW | - LIB_ID_COPY_NO_ANIMDATA), - false); + LIB_ID_COPY_NO_ANIMDATA)); for (node = ltree->nodes.first; node; node = node->next) { if (node->type == NODE_GROUP && node->id) { diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 5cb68a7e5bb..93d71a35240 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -1425,7 +1425,7 @@ void BKE_object_copy_data(Main *bmain, Object *ob_dst, const Object *ob_src, con Object *BKE_object_copy(Main *bmain, const Object *ob) { Object *ob_copy; - BKE_id_copy_ex(bmain, &ob->id, (ID **)&ob_copy, 0, false); + BKE_id_copy_ex(bmain, &ob->id, (ID **)&ob_copy, 0); /* We increase object user count when linking to Collections. */ id_us_min(&ob_copy->id); diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c index 235f38119d7..a9c25ac0737 100644 --- a/source/blender/blenkernel/intern/paint.c +++ b/source/blender/blenkernel/intern/paint.c @@ -445,7 +445,7 @@ void BKE_paint_curve_copy_data(Main *UNUSED(bmain), PaintCurve *pc_dst, const Pa PaintCurve *BKE_paint_curve_copy(Main *bmain, const PaintCurve *pc) { PaintCurve *pc_copy; - BKE_id_copy_ex(bmain, &pc->id, (ID **)&pc_copy, 0, false); + BKE_id_copy_ex(bmain, &pc->id, (ID **)&pc_copy, 0); return pc_copy; } @@ -526,7 +526,7 @@ void BKE_palette_copy_data(Main *UNUSED(bmain), Palette *palette_dst, const Pale Palette *BKE_palette_copy(Main *bmain, const Palette *palette) { Palette *palette_copy; - BKE_id_copy_ex(bmain, &palette->id, (ID **)&palette_copy, 0, false); + BKE_id_copy_ex(bmain, &palette->id, (ID **)&palette_copy, 0); return palette_copy; } diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index 4ccf898001e..06735f0f60c 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -3326,7 +3326,7 @@ void BKE_particlesettings_copy_data( ParticleSettings *BKE_particlesettings_copy(Main *bmain, const ParticleSettings *part) { ParticleSettings *part_copy; - BKE_id_copy_ex(bmain, &part->id, (ID **)&part_copy, 0, false); + BKE_id_copy_ex(bmain, &part->id, (ID **)&part_copy, 0); return part_copy; } diff --git a/source/blender/blenkernel/intern/particle_distribute.c b/source/blender/blenkernel/intern/particle_distribute.c index 0386e21b8a0..b2372c40b46 100644 --- a/source/blender/blenkernel/intern/particle_distribute.c +++ b/source/blender/blenkernel/intern/particle_distribute.c @@ -863,8 +863,7 @@ static int psys_thread_context_init_distribute(ParticleThreadContext *ctx, Parti LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_DEG_TAG | - LIB_ID_COPY_NO_PREVIEW, - false); + LIB_ID_COPY_NO_PREVIEW); } BKE_mesh_tessface_ensure(mesh); @@ -915,8 +914,7 @@ static int psys_thread_context_init_distribute(ParticleThreadContext *ctx, Parti LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_DEG_TAG | - LIB_ID_COPY_NO_PREVIEW, - false); + LIB_ID_COPY_NO_PREVIEW); BKE_mesh_tessface_ensure(mesh); diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 2b2b57b5079..008ef0b02bf 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -3200,8 +3200,7 @@ static void do_hair_dynamics(ParticleSimulationData *sim) LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_DEG_TAG | - LIB_ID_COPY_NO_PREVIEW, - false); + LIB_ID_COPY_NO_PREVIEW); deformedVerts = BKE_mesh_vertexCos_get(psys->hair_out_mesh, NULL); clothModifier_do(psys->clmd, sim->depsgraph, sim->scene, sim->ob, psys->hair_in_mesh, deformedVerts); BKE_mesh_apply_vert_coords(psys->hair_out_mesh, deformedVerts); @@ -4199,8 +4198,7 @@ static ParticleSettings *particle_settings_localize(ParticleSettings *particle_s (LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_DEG_TAG | - LIB_ID_COPY_CACHES), - false); + LIB_ID_COPY_CACHES)); return particle_settings_local; } diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 9c7a911e478..0298bc418ef 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -264,7 +264,7 @@ void BKE_scene_copy_data(Main *bmain, Scene *sce_dst, const Scene *sce_src, cons if (sce_src->nodetree) { /* Note: nodetree is *not* in bmain, however this specific case is handled at lower level * (see BKE_libblock_copy_ex()). */ - BKE_id_copy_ex(bmain, (ID *)sce_src->nodetree, (ID **)&sce_dst->nodetree, flag, false); + BKE_id_copy_ex(bmain, (ID *)sce_src->nodetree, (ID **)&sce_dst->nodetree, flag); BKE_libblock_relink_ex(bmain, sce_dst->nodetree, (void *)(&sce_src->id), &sce_dst->id, false); } @@ -387,7 +387,7 @@ Scene *BKE_scene_copy(Main *bmain, Scene *sce, int type) return sce_copy; } else { - BKE_id_copy_ex(bmain, (ID *)sce, (ID **)&sce_copy, LIB_ID_COPY_ACTIONS, false); + BKE_id_copy_ex(bmain, (ID *)sce, (ID **)&sce_copy, LIB_ID_COPY_ACTIONS); id_us_min(&sce_copy->id); id_us_ensure_real(&sce_copy->id); @@ -400,7 +400,7 @@ Scene *BKE_scene_copy(Main *bmain, Scene *sce, int type) if (lineset->linestyle) { id_us_min(&lineset->linestyle->id); /* XXX Not copying anim/actions here? */ - BKE_id_copy_ex(bmain, (ID *)lineset->linestyle, (ID **)&lineset->linestyle, 0, false); + BKE_id_copy_ex(bmain, (ID *)lineset->linestyle, (ID **)&lineset->linestyle, 0); } } } @@ -408,7 +408,7 @@ Scene *BKE_scene_copy(Main *bmain, Scene *sce, int type) /* Full copy of world (included animations) */ if (sce_copy->world) { id_us_min(&sce_copy->world->id); - BKE_id_copy_ex(bmain, (ID *)sce_copy->world, (ID **)&sce_copy->world, LIB_ID_COPY_ACTIONS, false); + BKE_id_copy_ex(bmain, (ID *)sce_copy->world, (ID **)&sce_copy->world, LIB_ID_COPY_ACTIONS); } /* Collections */ @@ -418,7 +418,7 @@ Scene *BKE_scene_copy(Main *bmain, Scene *sce, int type) /* XXX Not copying anim/actions here? */ if (sce_copy->gpd) { id_us_min(&sce_copy->gpd->id); - BKE_id_copy_ex(bmain, (ID *)sce_copy->gpd, (ID **)&sce_copy->gpd, 0, false); + BKE_id_copy_ex(bmain, (ID *)sce_copy->gpd, (ID **)&sce_copy->gpd, 0); } } else { diff --git a/source/blender/blenkernel/intern/speaker.c b/source/blender/blenkernel/intern/speaker.c index c0368cfa4ba..1a421aedba9 100644 --- a/source/blender/blenkernel/intern/speaker.c +++ b/source/blender/blenkernel/intern/speaker.c @@ -75,7 +75,7 @@ void BKE_speaker_copy_data(Main *UNUSED(bmain), Speaker *UNUSED(spk_dst), const Speaker *BKE_speaker_copy(Main *bmain, const Speaker *spk) { Speaker *spk_copy; - BKE_id_copy_ex(bmain, &spk->id, (ID **)&spk_copy, 0, false); + BKE_id_copy_ex(bmain, &spk->id, (ID **)&spk_copy, 0); return spk_copy; } diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index dc1b3b5fdb0..24f4a86d1bf 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -496,7 +496,7 @@ void BKE_text_copy_data(Main *UNUSED(bmain), Text *ta_dst, const Text *ta_src, c Text *BKE_text_copy(Main *bmain, const Text *ta) { Text *ta_copy; - BKE_id_copy_ex(bmain, &ta->id, (ID **)&ta_copy, 0, false); + BKE_id_copy_ex(bmain, &ta->id, (ID **)&ta_copy, 0); return ta_copy; } diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c index ec6faec142c..498a84a681c 100644 --- a/source/blender/blenkernel/intern/texture.c +++ b/source/blender/blenkernel/intern/texture.c @@ -432,7 +432,7 @@ void BKE_texture_copy_data(Main *bmain, Tex *tex_dst, const Tex *tex_src, const } /* Note: nodetree is *not* in bmain, however this specific case is handled at lower level * (see BKE_libblock_copy_ex()). */ - BKE_id_copy_ex(bmain, (ID *)tex_src->nodetree, (ID **)&tex_dst->nodetree, flag, false); + BKE_id_copy_ex(bmain, (ID *)tex_src->nodetree, (ID **)&tex_dst->nodetree, flag); } if ((flag & LIB_ID_COPY_NO_PREVIEW) == 0) { @@ -446,7 +446,7 @@ void BKE_texture_copy_data(Main *bmain, Tex *tex_dst, const Tex *tex_src, const Tex *BKE_texture_copy(Main *bmain, const Tex *tex) { Tex *tex_copy; - BKE_id_copy_ex(bmain, &tex->id, (ID **)&tex_copy, 0, false); + BKE_id_copy_ex(bmain, &tex->id, (ID **)&tex_copy, 0); return tex_copy; } diff --git a/source/blender/blenkernel/intern/world.c b/source/blender/blenkernel/intern/world.c index a0aaefec07c..1c00e09d608 100644 --- a/source/blender/blenkernel/intern/world.c +++ b/source/blender/blenkernel/intern/world.c @@ -108,7 +108,7 @@ void BKE_world_copy_data(Main *bmain, World *wrld_dst, const World *wrld_src, co if (wrld_src->nodetree) { /* Note: nodetree is *not* in bmain, however this specific case is handled at lower level * (see BKE_libblock_copy_ex()). */ - BKE_id_copy_ex(bmain, (ID *)wrld_src->nodetree, (ID **)&wrld_dst->nodetree, flag, false); + BKE_id_copy_ex(bmain, (ID *)wrld_src->nodetree, (ID **)&wrld_dst->nodetree, flag); } BLI_listbase_clear(&wrld_dst->gpumaterial); @@ -125,7 +125,7 @@ void BKE_world_copy_data(Main *bmain, World *wrld_dst, const World *wrld_src, co World *BKE_world_copy(Main *bmain, const World *wrld) { World *wrld_copy; - BKE_id_copy_ex(bmain, &wrld->id, (ID **)&wrld_copy, 0, false); + BKE_id_copy_ex(bmain, &wrld->id, (ID **)&wrld_copy, 0); return wrld_copy; } diff --git a/source/blender/collada/collada_utils.cpp b/source/blender/collada/collada_utils.cpp index 12ca7a24657..63290f38ac8 100644 --- a/source/blender/collada/collada_utils.cpp +++ b/source/blender/collada/collada_utils.cpp @@ -287,8 +287,7 @@ Mesh *bc_get_mesh_copy( LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_DEG_TAG | - LIB_ID_COPY_NO_PREVIEW, - false); + LIB_ID_COPY_NO_PREVIEW); if (triangulate) { bc_triangulate_mesh(tmpmesh); diff --git a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc index 6bc4d2c7b74..ede0333ea48 100644 --- a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc +++ b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc @@ -294,8 +294,7 @@ bool id_copy_inplace_no_main(const ID *id, ID *newid) LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_ALLOCATE | LIB_ID_CREATE_NO_DEG_TAG | - LIB_ID_COPY_CACHES), - false); + LIB_ID_COPY_CACHES)); #ifdef NESTED_ID_NASTY_WORKAROUND if (result) { @@ -325,8 +324,7 @@ bool scene_copy_inplace_no_main(const Scene *scene, Scene *new_scene) LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_ALLOCATE | - LIB_ID_CREATE_NO_DEG_TAG, - false); + LIB_ID_CREATE_NO_DEG_TAG); #ifdef NESTED_ID_NASTY_WORKAROUND if (result) { diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index ae522a335fe..662c1b7df50 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -733,8 +733,7 @@ static void template_ID( but->flag |= UI_BUT_UNDO; UI_but_funcN_set(but, template_id_cb, MEM_dupallocN(template_ui), POINTER_FROM_INT(UI_ID_ALONE)); - if (/* test only */ - (id_copy(CTX_data_main(C), id, NULL, true) == false) || + if ((!BKE_id_copy_is_allowed(id)) || (idfrom && idfrom->lib) || (!editable) || /* object in editmode - don't change data */ diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c index 8d2ea9864ee..4894828f808 100644 --- a/source/blender/editors/physics/particle_object.c +++ b/source/blender/editors/physics/particle_object.c @@ -722,8 +722,7 @@ static bool remap_hair_emitter( LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_DEG_TAG | - LIB_ID_COPY_NO_PREVIEW, - false); + LIB_ID_COPY_NO_PREVIEW); /* BMESH_ONLY, deform dm may not have tessface */ BKE_mesh_tessface_ensure(mesh); @@ -1104,8 +1103,7 @@ static bool copy_particle_systems_to_object(const bContext *C, LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_DEG_TAG | - LIB_ID_COPY_NO_PREVIEW, - false); + LIB_ID_COPY_NO_PREVIEW); BKE_mesh_calc_normals(psmd->mesh_final); BKE_mesh_tessface_ensure(psmd->mesh_final); diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index d287a9ba9b4..9560be60585 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -363,8 +363,10 @@ static ID *rna_ID_copy(ID *id, Main *bmain) { ID *newid; - if (id_copy(bmain, id, &newid, false)) { - if (newid) id_us_min(newid); + if (id_copy(bmain, id, &newid)) { + if (newid != NULL) { + id_us_min(newid); + } return newid; } diff --git a/source/blender/modifiers/intern/MOD_boolean.c b/source/blender/modifiers/intern/MOD_boolean.c index d5f123f2d6a..2aab1b7844d 100644 --- a/source/blender/modifiers/intern/MOD_boolean.c +++ b/source/blender/modifiers/intern/MOD_boolean.c @@ -115,8 +115,7 @@ static Mesh *get_quick_mesh( LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_DEG_TAG | - LIB_ID_COPY_NO_PREVIEW, - false); + LIB_ID_COPY_NO_PREVIEW); float imat[4][4]; float omat[4][4]; diff --git a/source/blender/modifiers/intern/MOD_cloth.c b/source/blender/modifiers/intern/MOD_cloth.c index c425abe142e..27ec0595b54 100644 --- a/source/blender/modifiers/intern/MOD_cloth.c +++ b/source/blender/modifiers/intern/MOD_cloth.c @@ -92,8 +92,7 @@ static void deformVerts( LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_DEG_TAG | - LIB_ID_COPY_NO_PREVIEW, - false); + LIB_ID_COPY_NO_PREVIEW); } /* TODO(sergey): For now it actually duplicates logic from DerivedMesh.c diff --git a/source/blender/modifiers/intern/MOD_collision.c b/source/blender/modifiers/intern/MOD_collision.c index a2f70fe6913..541bbf32af8 100644 --- a/source/blender/modifiers/intern/MOD_collision.c +++ b/source/blender/modifiers/intern/MOD_collision.c @@ -112,8 +112,7 @@ static void deformVerts( LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_DEG_TAG | - LIB_ID_COPY_NO_PREVIEW, - false); + LIB_ID_COPY_NO_PREVIEW); } if (!ob->pd) { diff --git a/source/blender/modifiers/intern/MOD_datatransfer.c b/source/blender/modifiers/intern/MOD_datatransfer.c index 3841ca50bcb..1e90642cf62 100644 --- a/source/blender/modifiers/intern/MOD_datatransfer.c +++ b/source/blender/modifiers/intern/MOD_datatransfer.c @@ -182,8 +182,7 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_DEG_TAG | - LIB_ID_COPY_NO_PREVIEW, - false); + LIB_ID_COPY_NO_PREVIEW); } BKE_reports_init(&reports, RPT_STORE); diff --git a/source/blender/modifiers/intern/MOD_meshsequencecache.c b/source/blender/modifiers/intern/MOD_meshsequencecache.c index 16fcbadb0f3..1c547f23978 100644 --- a/source/blender/modifiers/intern/MOD_meshsequencecache.c +++ b/source/blender/modifiers/intern/MOD_meshsequencecache.c @@ -122,8 +122,7 @@ static Mesh *applyModifier( LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_DEG_TAG | - LIB_ID_COPY_NO_PREVIEW, - false); + LIB_ID_COPY_NO_PREVIEW); } } diff --git a/source/blender/modifiers/intern/MOD_normal_edit.c b/source/blender/modifiers/intern/MOD_normal_edit.c index a92e86ec9f0..37e3acdee1f 100644 --- a/source/blender/modifiers/intern/MOD_normal_edit.c +++ b/source/blender/modifiers/intern/MOD_normal_edit.c @@ -416,8 +416,7 @@ static Mesh *normalEditModifier_do( LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_DEG_TAG | - LIB_ID_COPY_NO_PREVIEW, - false); + LIB_ID_COPY_NO_PREVIEW); } else { result = mesh; diff --git a/source/blender/modifiers/intern/MOD_ocean.c b/source/blender/modifiers/intern/MOD_ocean.c index 6570f222877..e0f6eff56d4 100644 --- a/source/blender/modifiers/intern/MOD_ocean.c +++ b/source/blender/modifiers/intern/MOD_ocean.c @@ -388,8 +388,7 @@ static Mesh *doOcean(ModifierData *md, const ModifierEvalContext *ctx, Mesh *mes LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_DEG_TAG | - LIB_ID_COPY_NO_PREVIEW, - false); + LIB_ID_COPY_NO_PREVIEW); } cfra_for_cache = cfra_scene; diff --git a/source/blender/modifiers/intern/MOD_surface.c b/source/blender/modifiers/intern/MOD_surface.c index e467c6fcd17..beaf471778b 100644 --- a/source/blender/modifiers/intern/MOD_surface.c +++ b/source/blender/modifiers/intern/MOD_surface.c @@ -119,8 +119,7 @@ static void deformVerts( LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_DEG_TAG | - LIB_ID_COPY_NO_PREVIEW, - false); + LIB_ID_COPY_NO_PREVIEW); } else { surmd->mesh = MOD_deform_mesh_eval_get(ctx->object, NULL, NULL, NULL, numVerts, false, false); diff --git a/source/blender/modifiers/intern/MOD_util.c b/source/blender/modifiers/intern/MOD_util.c index 52b5fbf53b8..d40dd6545b7 100644 --- a/source/blender/modifiers/intern/MOD_util.c +++ b/source/blender/modifiers/intern/MOD_util.c @@ -190,8 +190,7 @@ Mesh *MOD_deform_mesh_eval_get( LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_DEG_TAG | LIB_ID_COPY_NO_PREVIEW | - LIB_ID_COPY_CD_REFERENCE), - false); + LIB_ID_COPY_CD_REFERENCE)); mesh->runtime.deformed_only = 1; } diff --git a/source/blender/modifiers/intern/MOD_weighted_normal.c b/source/blender/modifiers/intern/MOD_weighted_normal.c index e3c09fa944b..d61fcb01d5e 100644 --- a/source/blender/modifiers/intern/MOD_weighted_normal.c +++ b/source/blender/modifiers/intern/MOD_weighted_normal.c @@ -495,8 +495,7 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_DEG_TAG | - LIB_ID_COPY_NO_PREVIEW, - false); + LIB_ID_COPY_NO_PREVIEW); const int numVerts = result->totvert; const int numEdges = result->totedge; |