From 0f49e4832cf2afad437aa16ebbbe37191de9af71 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Thu, 19 Aug 2021 11:13:55 +0200 Subject: Cleanup: Blendwrite: Move code deciding if an ID should be written out of ID callbacks. This was not really useful, and added estra useless steps in case and ID should not actually be written. Further more, it prevented clearing the usercount on write, which can be cause a false positive 'chanhged' detection in undo/redo case. --- source/blender/blenkernel/intern/text.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'source/blender/blenkernel/intern/text.c') diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index 6048e823abb..275cf0d4c38 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -171,9 +171,6 @@ static void text_free_data(ID *id) static void text_blend_write(BlendWriter *writer, ID *id, const void *id_address) { - if (id->us < 1 && !BLO_write_is_undo(writer)) { - return; - } Text *text = (Text *)id; /* NOTE: we are clearing local temp data here, *not* the flag in the actual 'real' ID. */ -- cgit v1.2.3