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-13 16:29:27 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-02-13 16:31:56 +0300
commiteb7f2457e589e1a071b2e3f45e1dd9f4ac1d62ed (patch)
treece8f0af21355b817ed5a311ee243c4f723b3ef0c /source/blender/blenkernel/intern/library.c
parent5e3838faa2e6dae0ac52860085f5dc4b7a000ea5 (diff)
Cleanup: do not cleanup runtime data twice during ID copying...
More or less same code was being executed twice during ID copying. Makes no sense to add yet another switch-by-ID-type to handle specificaly runtime data during ID copying, we already have BKE_xxx_copy_data() functions for that.
Diffstat (limited to 'source/blender/blenkernel/intern/library.c')
-rw-r--r--source/blender/blenkernel/intern/library.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index 47884f0e429..0ab6268ad9e 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -511,32 +511,6 @@ static int id_copy_libmanagement_cb(void *user_data, ID *UNUSED(id_self), ID **i
return IDWALK_RET_NOP;
}
-static void id_copy_clear_runtime_pointers(ID *id, int UNUSED(flag))
-{
- if (id == NULL) {
- return;
- }
- /* TODO(sergey): We might want to do a deep-copy of all the pointers inside.
- * This isn't currently needed, and is quite involved change (to cover all
- * things like batch cache and such). */
- switch ((ID_Type)GS(id->name)) {
- case ID_OB:
- {
- Object *object = (Object *)id;
- BKE_object_runtime_reset_on_copy(object);
- break;
- }
- case ID_ME:
- {
- Mesh *mesh = (Mesh *)id;
- BKE_mesh_runtime_reset_on_copy(mesh);
- break;
- }
- default:
- break;
- }
-}
-
bool BKE_id_copy_is_allowed(const ID *id)
{
#define LIB_ID_TYPES_NOCOPY ID_LI, ID_SCR, ID_WM, /* Not supported */ \
@@ -703,8 +677,6 @@ bool BKE_id_copy_ex(Main *bmain, const ID *id, ID **r_newid, const int flag)
(*r_newid)->lib = id->lib;
}
- id_copy_clear_runtime_pointers(*r_newid, flag);
-
return true;
}