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:
authorJulian Eisel <julian@blender.org>2020-12-14 17:19:09 +0300
committerJulian Eisel <julian@blender.org>2020-12-15 19:03:48 +0300
commit303aceb917b892e1144b88663225ee3b1e78eabe (patch)
tree9a669a54a241d3f45426cfaf4e0765ef4dcc9938 /source/blender/blenkernel
parent2d6a69ae4e9905a19ac7228b97ed08fb4ea72e75 (diff)
Fix asset previews not showing in "Current File" repository after reading
Previews would be flagged as unfinished when reading. Instead clear the flag and always consider them finished upon reading. If we wouldn't do this, the File Browser would keep running the preview updating to wait for the preview to finish. It could be smarter and also check if there's actually a preview job running. Instead, I think it will just display an unfilled buffer for now. Up until today we wouldn't even know if a stored preview is finished or not, so it would always assume they are finished. We do the same now, but have the option to make it smarter.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/icons.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/icons.cc b/source/blender/blenkernel/intern/icons.cc
index b92b2259eeb..4bd850094f0 100644
--- a/source/blender/blenkernel/intern/icons.cc
+++ b/source/blender/blenkernel/intern/icons.cc
@@ -658,7 +658,9 @@ void BKE_previewimg_blend_read(BlendDataReader *reader, PreviewImage *prv)
BLO_read_data_address(reader, &prv->rect[i]);
}
prv->gputexture[i] = NULL;
- prv->flag[i] |= PRV_UNFINISHED;
+ /* For now consider previews read from file as finished to not confuse File Browser preview
+ * loading. That could be smarter and check if there's a preview job running instead. */
+ prv->flag[i] &= ~PRV_UNFINISHED;
}
prv->icon_id = 0;
prv->tag = 0;