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.
This commit is contained in:
Bastien Montagne 2020-07-03 16:57:55 +02:00
parent 1bdabd7b4f
commit fac2e63bc0
1 changed files with 4 additions and 5 deletions

View File

@ -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);