[Bf-blender-cvs] [98d797b67c0] master: Fix missing ID remapping in Action editor callback.

Bastien Montagne noreply at git.blender.org
Wed Sep 20 20:28:41 CEST 2017


Commit: 98d797b67c07e85889768bf8ecde292e9e6f70e9
Author: Bastien Montagne
Date:   Wed Sep 20 20:24:54 2017 +0200
Branches: master
https://developer.blender.org/rB98d797b67c07e85889768bf8ecde292e9e6f70e9

Fix missing ID remapping in Action editor callback.

Spotted by Joshua Leung (@aligorith), thanks!

Should probably be backported to 2.79a should we do it.

===================================================================

M	source/blender/editors/space_action/space_action.c

===================================================================

diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c
index 83655a2ba9e..5cde224b7dc 100644
--- a/source/blender/editors/space_action/space_action.c
+++ b/source/blender/editors/space_action/space_action.c
@@ -624,13 +624,17 @@ static void action_id_remap(ScrArea *UNUSED(sa), SpaceLink *slink, ID *old_id, I
 {
 	SpaceAction *sact = (SpaceAction *)slink;
 
-	if (!ELEM(GS(old_id->name), ID_GR)) {
-		return;
+	if ((ID *)sact->action == old_id) {
+		sact->action = (bAction *)new_id;
 	}
 
 	if ((ID *)sact->ads.filter_grp == old_id) {
 		sact->ads.filter_grp = (Group *)new_id;
 	}
+	if ((ID *)sact->ads.source == old_id) {
+		sact->ads.source = new_id;
+	}
+
 }
 
 /* only called once, from space/spacetypes.c */



More information about the Bf-blender-cvs mailing list