Fix T75675: Unlinking [with setting users to zero] not clearing
LIB_TAG_EXTRAUSER_SET flag For example in the Image Editor, an assert would be triggered after unlinking an image [with setting users to zero] and then setting the image for the Image Editor again. Whenever we set an Image for Image Editor, the Image ID is flagged LIB_TAG_EXTRAUSER_SET, when we unlink [with setting users to zero] this flag was not cleared. quote @mont29: "a proper fix would be to move this to modern code, and actually delete the ID..." but that is for later. Maniphest Tasks: T75675 Differential Revision: https://developer.blender.org/D7452
This commit is contained in:
@@ -536,6 +536,7 @@ static void template_id_cb(bContext *C, void *arg_litem, void *arg_event)
|
||||
|
||||
if (id && CTX_wm_window(C)->eventstate->shift) {
|
||||
/* only way to force-remove data (on save) */
|
||||
id_us_clear_real(id);
|
||||
id_fake_user_clear(id);
|
||||
id->us = 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user