diff options
author | Jeroen Bakker <jeroen@blender.org> | 2022-01-25 17:31:46 +0300 |
---|---|---|
committer | Fabian Schempp <fabianschempp@googlemail.com> | 2022-04-11 01:28:39 +0300 |
commit | 3977f9faeac6c1c8c1b69e0afffd0b1abdf6af5d (patch) | |
tree | b5c94a646d561e61d644befec24960ac261e8804 /source/blender/editors/space_graph | |
parent | da81fceea2277a788bd3ae0a0225428d103fb5fe (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/space_graph')
-rw-r--r-- | source/blender/editors/space_graph/space_graph.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c index 7d5e8836490..40c95d4f382 100644 --- a/source/blender/editors/space_graph/space_graph.c +++ b/source/blender/editors/space_graph/space_graph.c @@ -36,7 +36,6 @@ #include "BKE_context.h" #include "BKE_fcurve.h" -#include "BKE_lib_remap.h" #include "BKE_screen.h" #include "ED_anim_api.h" @@ -797,17 +796,18 @@ static void graph_refresh(const bContext *C, ScrArea *area) graph_refresh_fcurve_colors(C); } -static void graph_id_remap(ScrArea *UNUSED(area), - SpaceLink *slink, - const struct IDRemapper *mappings) +static void graph_id_remap(ScrArea *UNUSED(area), SpaceLink *slink, ID *old_id, ID *new_id) { SpaceGraph *sgraph = (SpaceGraph *)slink; - if (!sgraph->ads) { - return; - } - BKE_id_remapper_apply(mappings, (ID **)&sgraph->ads->filter_grp, ID_REMAP_APPLY_DEFAULT); - BKE_id_remapper_apply(mappings, (ID **)&sgraph->ads->source, ID_REMAP_APPLY_DEFAULT); + if (sgraph->ads) { + if ((ID *)sgraph->ads->filter_grp == old_id) { + sgraph->ads->filter_grp = (Collection *)new_id; + } + if ((ID *)sgraph->ads->source == old_id) { + sgraph->ads->source = new_id; + } + } } static int graph_space_subtype_get(ScrArea *area) |