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>2017-11-29 15:13:16 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2017-11-29 19:23:25 +0300
commita36a47fe15eede1337992831d981245e89be4521 (patch)
tree8bce15cf84d467ac15a00ceed06f104a3e9c01c4 /source/blender/blenkernel/BKE_library.h
parent0439733cf8963dec13654c5b55556d8b11639d9c (diff)
Preparing merge of id_override_static: add BKE_id_swap().
This function swaps the memory content of two data-blocks (of same type obviously), while preserving most of the ID 'header' itself. It is intended to be used to quickly and easily replace the data of an existing ID by another one, presumably a temporary 'working' one, without having to suffer from things like name changes, registering/removing from Main database, etc.
Diffstat (limited to 'source/blender/blenkernel/BKE_library.h')
-rw-r--r--source/blender/blenkernel/BKE_library.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_library.h b/source/blender/blenkernel/BKE_library.h
index f320597ef2d..468aab9bdf9 100644
--- a/source/blender/blenkernel/BKE_library.h
+++ b/source/blender/blenkernel/BKE_library.h
@@ -147,6 +147,7 @@ bool id_make_local(struct Main *bmain, struct ID *id, const bool test, const boo
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);
+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);
void BKE_id_copy_ensure_local(struct Main *bmain, const struct ID *old_id, struct ID *new_id);