Commit: fc10e42de365943efad77367ac97280b5a33251f
Author: Bastien Montagne
Date: Thu Jun 16 16:47:32 2016 +0200
Branches: id-remap
https://developer.blender.org/rBfc10e42de365943efad77367ac97280b5a33251f
Finish TODOs related to buttons space and ID remapping.
===================================================================
M source/blender/editors/space_buttons/space_buttons.c
===================================================================
diff --git a/source/blender/editors/space_buttons/space_buttons.c
b/source/blender/editors/space_buttons/space_buttons.c
index f9fb152..122fb3e 100644
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@ -426,11 +426,22 @@ static void buttons_id_remap(ScrArea *UNUSED(sa),
SpaceLink *slink, ID *old_id,
}
else {
RNA_id_pointer_create(new_id, &path->ptr[i]);
- /* TODO_REMAP: Check path further down remains valid?
Or nullify it systematically? */
+ /* There is no easy way to check/make path downwards
valid, just nullify it.
+ * Next redraw will rebuild this anyway. */
+ i++;
+ memset(&path->ptr[i], 0, sizeof(path->ptr[i]) *
(path->len - i));
+ path->len = i;
}
}
- /* TODO_REMAP: sbuts->texuser ? */
+ if (sbuts->texuser) {
+ ButsContextTexture *ct = sbuts->texuser;
+ if (ct->texture == old_id) {
+ ct->texture = new_id;
+ }
+ BLI_freelistN(&ct->users);
+ ct->user = NULL;
+ }
}
/* only called once, from space/spacetypes.c */
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs