[Bf-blender-cvs] [f7354119cc8] master: Fix more missing ID remapping in animation editor callbacks
Joshua Leung
noreply at git.blender.org
Wed Feb 21 13:59:49 CET 2018
Commit: f7354119cc8089dd7a788bacec0259db14bf07b8
Author: Joshua Leung
Date: Thu Feb 15 15:45:08 2018 +1300
Branches: master
https://developer.blender.org/rBf7354119cc8089dd7a788bacec0259db14bf07b8
Fix more missing ID remapping in animation editor callbacks
Applying the same fixes as introduced in 98d797b67c07e85889768bf8ecde292e9e6f70e9
this time, for the Graph and NLA editors
===================================================================
M source/blender/editors/space_graph/space_graph.c
M source/blender/editors/space_nla/space_nla.c
===================================================================
diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c
index f12db310856..df6de83336d 100644
--- a/source/blender/editors/space_graph/space_graph.c
+++ b/source/blender/editors/space_graph/space_graph.c
@@ -683,13 +683,12 @@ static void graph_id_remap(ScrArea *UNUSED(sa), SpaceLink *slink, ID *old_id, ID
{
SpaceIpo *sgraph = (SpaceIpo *)slink;
- if (!ELEM(GS(old_id->name), ID_GR)) {
- return;
- }
-
if (sgraph->ads && (ID *)sgraph->ads->filter_grp == old_id) {
sgraph->ads->filter_grp = (Group *)new_id;
}
+ if ((ID *)sgraph->ads->source == old_id) {
+ sgraph->ads->source = new_id;
+ }
}
/* only called once, from space/spacetypes.c */
diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c
index 3b5604087b9..020b3a41f4d 100644
--- a/source/blender/editors/space_nla/space_nla.c
+++ b/source/blender/editors/space_nla/space_nla.c
@@ -506,13 +506,12 @@ static void nla_id_remap(ScrArea *UNUSED(sa), SpaceLink *slink, ID *old_id, ID *
{
SpaceNla *snla = (SpaceNla *)slink;
- if (!ELEM(GS(old_id->name), ID_GR)) {
- return;
- }
-
if ((ID *)snla->ads->filter_grp == old_id) {
snla->ads->filter_grp = (Group *)new_id;
}
+ if ((ID *)snla->ads->source == old_id) {
+ snla->ads->source = new_id;
+ }
}
/* only called once, from space/spacetypes.c */
More information about the Bf-blender-cvs
mailing list