Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2019-02-04 19:51:15 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-02-05 12:53:16 +0300
commitb6771ccaf6a547ae5463af7102fbe23a621c2bf2 (patch)
tree980826623272ed40a54a36c99340a4b35d0eaa88 /source/blender/blenkernel/intern/mesh.c
parent72724211df13a3e2b93839511be44e7b5f72a190 (diff)
BKE_library: id_copy: More general usage of LIB_ID_COPY_LOCALIZE.
Turns out most of our 'local working copy' cases can use same set of flags. Note that this commit adds LIB_ID_COPY_CACHES to all our local meshes copying, however this is no-op since that flag is unused during mesh copying... We may want to add another set of flags without that one at some point, but for now it would not be useful imho.
Diffstat (limited to 'source/blender/blenkernel/intern/mesh.c')
-rw-r--r--source/blender/blenkernel/intern/mesh.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c
index 30080b64e95..93bba2cf9d2 100644
--- a/source/blender/blenkernel/intern/mesh.c
+++ b/source/blender/blenkernel/intern/mesh.c
@@ -609,9 +609,7 @@ Mesh *BKE_mesh_new_nomain(int verts_len, int edges_len, int tessface_len, int lo
Mesh *mesh = BKE_libblock_alloc(
NULL, ID_ME,
BKE_idcode_to_name(ID_ME),
- LIB_ID_CREATE_NO_MAIN |
- LIB_ID_CREATE_NO_USER_REFCOUNT |
- LIB_ID_CREATE_NO_DEG_TAG);
+ LIB_ID_COPY_LOCALIZE);
BKE_libblock_init_empty(&mesh->id);
/* don't use CustomData_reset(...); because we dont want to touch customdata */
@@ -691,10 +689,7 @@ Mesh *BKE_mesh_new_nomain_from_template(
Mesh *BKE_mesh_copy_for_eval(struct Mesh *source, bool reference)
{
- int flags = (LIB_ID_CREATE_NO_MAIN |
- LIB_ID_CREATE_NO_USER_REFCOUNT |
- LIB_ID_CREATE_NO_DEG_TAG |
- LIB_ID_COPY_NO_PREVIEW);
+ int flags = LIB_ID_COPY_LOCALIZE;
if (reference) {
flags |= LIB_ID_COPY_CD_REFERENCE;