Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2020-07-03 17:57:55 +0300
committerBastien Montagne <bastien@blender.org>2020-07-03 18:01:21 +0300
commitfac2e63bc0545301bd57cb082ed003063dc9ce0f (patch)
tree7e2a3bce5c40ed09ebf19545777631fc43db5721 /source/blender/blenloader
parent1bdabd7b4f0d2db9b06110ad4ca92522d782f5dc (diff)
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.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c9
1 files 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);