diff options
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 40c95d4f382..7d5e8836490 100644 --- a/source/blender/editors/space_graph/space_graph.c +++ b/source/blender/editors/space_graph/space_graph.c @@ -36,6 +36,7 @@ #include "BKE_context.h" #include "BKE_fcurve.h" +#include "BKE_lib_remap.h" #include "BKE_screen.h" #include "ED_anim_api.h" @@ -796,18 +797,17 @@ static void graph_refresh(const bContext *C, ScrArea *area) graph_refresh_fcurve_colors(C); } -static void graph_id_remap(ScrArea *UNUSED(area), SpaceLink *slink, ID *old_id, ID *new_id) +static void graph_id_remap(ScrArea *UNUSED(area), + SpaceLink *slink, + const struct IDRemapper *mappings) { SpaceGraph *sgraph = (SpaceGraph *)slink; - - 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; - } + 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); } static int graph_space_subtype_get(ScrArea *area) |