From fac2e63bc0545301bd57cb082ed003063dc9ce0f Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Fri, 3 Jul 2020 16:57:55 +0200 Subject: [PATCH] Fix utterly broken code regarding GPUtextures of MovieClip in readfile.c Treat those as pure runtime code, reset to NULL by reading code, for now. Think those could be handled like Image gputextures (i.e. considered runtime cache and preserved across undo steps), but probably not critical for now. --- source/blender/blenloader/intern/readfile.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index d9dcd72b0b6..820edbe974d 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2034,7 +2034,6 @@ void blo_make_movieclip_pointer_map(FileData *fd, Main *oldmain) void blo_end_movieclip_pointer_map(FileData *fd, Main *oldmain) { OldNew *entry = fd->movieclipmap->entries; - MovieClip *clip = oldmain->movieclips.first; Scene *sce = oldmain->scenes.first; int i; @@ -2045,10 +2044,6 @@ void blo_end_movieclip_pointer_map(FileData *fd, Main *oldmain) } } - for (; clip; clip = clip->id.next) { - BLI_freelistN(&clip->runtime.gputextures); - } - for (; sce; sce = sce->id.next) { if (sce->nodetree) { bNode *node; @@ -8467,6 +8462,10 @@ static void direct_link_movieclip(BlendDataReader *reader, MovieClip *clip) clip->tracking_context = NULL; clip->tracking.stats = NULL; + /* TODO we could store those in undo cache storage as well, and preserve them instead of + * re-creating them... */ + BLI_listbase_clear(&clip->runtime.gputextures); + /* Needed for proper versioning, will be NULL for all newer files anyway. */ BLO_read_data_address(reader, &clip->tracking.stabilization.rot_track);