48 if (blen_group && blen_id) {
52 int i, nprevs, nnames;
54 if (libfiledata ==
NULL) {
66 if (!previews || (nnames != nprevs)) {
69 printf(
"%s: error, found %d items, %d previews\n", __func__, nnames, nprevs);
76 for (i = 0, ln =
names, lp = previews; i < nnames; i++, ln = ln->
next, lp = lp->
next) {
77 const char *blockname = ln->
link;
80 if (
STREQ(blockname, blen_id)) {
void BKE_previewimg_freefunc(void *link)
struct ImBuf * BKE_previewimg_to_imbuf(struct PreviewImage *prv, const int size)
short BKE_idtype_idcode_from_name(const char *idtype_name)
struct ImBuf * BKE_main_thumbnail_to_imbuf(struct Main *bmain, struct BlendThumbnail *data)
void BLI_linklist_freeN(LinkNode *list)
void BLI_linklist_free(LinkNode *list, LinkNodeFreeFP freefunc)
defines for blend-file codes.
external readfile function prototypes.
struct LinkNode * BLO_blendhandle_get_previews(BlendHandle *bh, int ofblocktype, int *r_tot_prev)
struct BlendHandle BlendHandle
struct LinkNode * BLO_blendhandle_get_datablock_names(BlendHandle *bh, int ofblocktype, const bool use_assets_only, int *r_tot_names)
BlendHandle * BLO_blendhandle_from_file(const char *filepath, struct ReportList *reports)
void BLO_blendhandle_close(BlendHandle *bh)
struct BlendThumbnail * BLO_thumbnail_from_file(const char *filepath)
ID and Library types, which are fundamental for sdna.
Contains defines and structs used throughout the imbuf module.
Read Guarded memory(de)allocation.
void(* MEM_freeN)(void *vmemh)
ImBuf * IMB_thumb_load_blend(const char *blen_path, const char *blen_group, const char *blen_id)