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.
This commit is contained in:
parent
2d6a69ae4e
commit
303aceb917
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue