diff options
author | Jeroen Bakker <jeroen@blender.org> | 2022-01-25 17:31:46 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2022-01-25 17:31:46 +0300 |
commit | 460e0a1347e50d33f5d42235ee2d9cb7208cdc4f (patch) | |
tree | 76f51516a6865d42315f9f6f5b30147d75082dcb /source/blender/editors/space_action/space_action.c | |
parent | 33ba298b5db24b002d936e135c3c84aa2300e6db (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_action/space_action.c')
-rw-r--r-- | source/blender/editors/space_action/space_action.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c index ba96ac52f1f..4463856f40a 100644 --- a/source/blender/editors/space_action/space_action.c +++ b/source/blender/editors/space_action/space_action.c @@ -36,7 +36,6 @@ #include "BLI_utildefines.h" #include "BKE_context.h" -#include "BKE_lib_remap.h" #include "BKE_nla.h" #include "BKE_screen.h" @@ -815,15 +814,20 @@ static void action_refresh(const bContext *C, ScrArea *area) /* XXX re-sizing y-extents of tot should go here? */ } -static void action_id_remap(ScrArea *UNUSED(area), - SpaceLink *slink, - const struct IDRemapper *mappings) +static void action_id_remap(ScrArea *UNUSED(area), SpaceLink *slink, ID *old_id, ID *new_id) { SpaceAction *sact = (SpaceAction *)slink; - BKE_id_remapper_apply(mappings, (ID **)&sact->action, ID_REMAP_APPLY_DEFAULT); - BKE_id_remapper_apply(mappings, (ID **)&sact->ads.filter_grp, ID_REMAP_APPLY_DEFAULT); - BKE_id_remapper_apply(mappings, &sact->ads.source, ID_REMAP_APPLY_DEFAULT); + if ((ID *)sact->action == old_id) { + sact->action = (bAction *)new_id; + } + + if ((ID *)sact->ads.filter_grp == old_id) { + sact->ads.filter_grp = (Collection *)new_id; + } + if ((ID *)sact->ads.source == old_id) { + sact->ads.source = new_id; + } } /** |