diff options
author | Bastien Montagne <mont29> | 2022-02-03 19:57:40 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2022-02-04 11:30:44 +0300 |
commit | e9fc25835f2091cf6533d92379a31c0656b4aafb (patch) | |
tree | 90b4bbfb87172abc08483c91200809d9a2545c8c /source/blender/blenloader/intern | |
parent | 5a4eadc2e7cd607c83f7039609d8a27495efb20a (diff) |
Remove internal proxy code, and deprecate related DNA data.
Part of T91671.
Not much else to say, this is mainly a massive deletion of code.
Note that a few cleanups possible after this proxy removal were kept out
of this commit to try to reduce a bit its size.
Reviewed By: sergey, brecht
Maniphest Tasks: T91671
Differential Revision: https://developer.blender.org/D13995
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r-- | source/blender/blenloader/intern/readblenentry.c | 3 | ||||
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 19 | ||||
-rw-r--r-- | source/blender/blenloader/intern/readfile.h | 8 |
3 files changed, 0 insertions, 30 deletions
diff --git a/source/blender/blenloader/intern/readblenentry.c b/source/blender/blenloader/intern/readblenentry.c index f3c92aec338..a334d70819d 100644 --- a/source/blender/blenloader/intern/readblenentry.c +++ b/source/blender/blenloader/intern/readblenentry.c @@ -419,9 +419,6 @@ BlendFileData *BLO_read_from_memfile(Main *oldmain, fd->skip_flags = params->skip_flags; BLI_strncpy(fd->relabase, filename, sizeof(fd->relabase)); - /* clear ob->proxy_from pointers in old main */ - blo_clear_proxy_pointers_from_lib(oldmain); - /* separate libraries from old main */ blo_split_main(&old_mainlist, oldmain); /* add the library pointers in oldmap lookup */ diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 38f2d8bb22c..2ba66657499 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -1580,15 +1580,6 @@ static void change_link_placeholder_to_real_ID_pointer(ListBase *mainlist, } } -void blo_clear_proxy_pointers_from_lib(Main *oldmain) -{ - LISTBASE_FOREACH (Object *, ob, &oldmain->objects) { - if (ID_IS_LINKED(ob) && ob->proxy_from != NULL && !ID_IS_LINKED(ob->proxy_from)) { - ob->proxy_from = NULL; - } - } -} - /* XXX disabled this feature - packed files also belong in temp saves and quit.blend, * to make restore work. */ @@ -3207,18 +3198,8 @@ static void read_libblock_undo_restore_identical( id_old->recalc |= direct_link_id_restore_recalc_exceptions(id_old); id_old->recalc_after_undo_push = 0; - /* As usual, proxies require some special love... - * In `blo_clear_proxy_pointers_from_lib()` we clear all `proxy_from` pointers to local IDs, for - * undo. This is required since we do not re-read linked data in that case, so we also do not - * re-'lib_link' their pointers. - * Those `proxy_from` pointers are then re-defined properly when lib_linking the newly read local - * object. However, in case of re-used data 'as-is', we never lib_link it again, so we have to - * fix those backward pointers here. */ if (GS(id_old->name) == ID_OB) { Object *ob = (Object *)id_old; - if (ob->proxy != NULL) { - ob->proxy->proxy_from = ob; - } /* For undo we stay in object mode during undo presses, so keep editmode disabled for re-used * data-blocks too. */ ob->mode &= ~OB_MODE_EDIT; diff --git a/source/blender/blenloader/intern/readfile.h b/source/blender/blenloader/intern/readfile.h index 21b0354b097..44045cf99dd 100644 --- a/source/blender/blenloader/intern/readfile.h +++ b/source/blender/blenloader/intern/readfile.h @@ -144,14 +144,6 @@ FileData *blo_filedata_from_memfile(struct MemFile *memfile, const struct BlendFileReadParams *params, struct BlendFileReadReport *reports); -/** - * Lib linked proxy objects point to our local data, we need - * to clear that pointer before reading the undo memfile since - * the object might be removed, it is set again in reading - * if the local object still exists. - * This is only valid for local proxy objects though, linked ones should not be affected here. - */ -void blo_clear_proxy_pointers_from_lib(struct Main *oldmain); void blo_make_packed_pointer_map(FileData *fd, struct Main *oldmain); /** * Set old main packed data to zero if it has been restored |