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:
authorJeroen Bakker <jeroen@blender.org>2021-08-25 15:15:57 +0300
committerJeroen Bakker <jeroen@blender.org>2021-08-25 16:59:41 +0300
commit0fd1e6a5f43df8b0f5382c07975c0d031bbbb506 (patch)
tree07a7fa7e63b6a741e477b1deec9aa65f0820697d /source/blender/blenloader/BLO_readfile.h
parent5a0ec2302eeb33a03b36f8021bb2338e0dba2ee4 (diff)
T90908: Reduce loading times when extracting thumbnails from Blendfiles.
Previously when loading an thumbnails for an asset the whole file was read. Reason this was done was perhaps a future idea to load all thumbnails inside a blendfile in a single go. This was never implemented and currently unneeded disk and cpu cycles was spend with finding out what preview to load. This patch adds an early break when the thumbnail that the caller is interested in has been found. This improves the thumbnail extraction when looking into large files. Reviewed By: mont29 Maniphest Tasks: T90908 Differential Revision: https://developer.blender.org/D12312
Diffstat (limited to 'source/blender/blenloader/BLO_readfile.h')
-rw-r--r--source/blender/blenloader/BLO_readfile.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h
index dbdb181281a..4b7f29dd7dc 100644
--- a/source/blender/blenloader/BLO_readfile.h
+++ b/source/blender/blenloader/BLO_readfile.h
@@ -172,6 +172,9 @@ struct LinkNode *BLO_blendhandle_get_datablock_info(BlendHandle *bh,
int ofblocktype,
int *r_tot_info_items);
struct LinkNode *BLO_blendhandle_get_previews(BlendHandle *bh, int ofblocktype, int *r_tot_prev);
+struct PreviewImage *BLO_blendhandle_get_preview_for_id(BlendHandle *bh,
+ int ofblocktype,
+ const char *name);
struct LinkNode *BLO_blendhandle_get_linkable_groups(BlendHandle *bh);
void BLO_blendhandle_close(BlendHandle *bh);