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:
authorJeroen Bakker <jeroen@blender.org>2022-01-25 17:31:46 +0300
committerJeroen Bakker <jeroen@blender.org>2022-01-25 17:31:46 +0300
commit460e0a1347e50d33f5d42235ee2d9cb7208cdc4f (patch)
tree76f51516a6865d42315f9f6f5b30147d75082dcb /source/blender/editors/util
parent33ba298b5db24b002d936e135c3c84aa2300e6db (diff)
Revert "Performance: Remap multiple items in UI"
This reverts commit 948211679f2a0681421160be0d3b90f507bc0be7. This commit introduced some regressions in the test suite. As this change is a core part of blender Bastien and I decided to revert it as the solution isn't clear and needs more investigation. The following tests FAILED: 62 - blendfile_liblink (SEGFAULT) 63 - blendfile_library_overrides (SEGFAULT) It fails in (id_us_ensure_real)
Diffstat (limited to 'source/blender/editors/util')
-rw-r--r--source/blender/editors/util/ed_util.c21
1 files changed, 2 insertions, 19 deletions
diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c
index 0320a2a9a1a..882f140c063 100644
--- a/source/blender/editors/util/ed_util.c
+++ b/source/blender/editors/util/ed_util.c
@@ -35,7 +35,6 @@
#include "BKE_collection.h"
#include "BKE_global.h"
-#include "BKE_lib_remap.h"
#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_multires.h"
@@ -435,27 +434,11 @@ void unpack_menu(bContext *C,
UI_popup_menu_end(C, pup);
}
-void ED_spacedata_id_remap(struct ScrArea *area,
- struct SpaceLink *sl,
- const struct IDRemapper *mappings)
-{
- SpaceType *st = BKE_spacetype_from_id(sl->spacetype);
- if (st && st->id_remap) {
- st->id_remap(area, sl, mappings);
- }
-}
-
-void ED_spacedata_id_remap_single(struct ScrArea *area,
- struct SpaceLink *sl,
- ID *old_id,
- ID *new_id)
+void ED_spacedata_id_remap(struct ScrArea *area, struct SpaceLink *sl, ID *old_id, ID *new_id)
{
SpaceType *st = BKE_spacetype_from_id(sl->spacetype);
if (st && st->id_remap) {
- struct IDRemapper *mappings = BKE_id_remapper_create();
- BKE_id_remapper_add(mappings, old_id, new_id);
- st->id_remap(area, sl, mappings);
- BKE_id_remapper_free(mappings);
+ st->id_remap(area, sl, old_id, new_id);
}
}