Changeset View
Changeset View
Standalone View
Standalone View
source/blender/imbuf/intern/thumbs.c
| Show First 20 Lines • Show All 356 Lines • ▼ Show 20 Lines | if (BLI_path_ncmp(file_path, tdir, sizeof(tdir)) == 0) { | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| if (size == THB_FAIL) { | if (size == THB_FAIL) { | ||||
| img = IMB_allocImBuf(1, 1, 32, IB_rect | IB_metadata); | img = IMB_allocImBuf(1, 1, 32, IB_rect | IB_metadata); | ||||
| if (!img) return NULL; | if (!img) return NULL; | ||||
| } | } | ||||
| else { | else { | ||||
| if (ELEM(source, THB_SOURCE_IMAGE, THB_SOURCE_BLEND, THB_SOURCE_FONT)) { | if (ELEM(source, THB_SOURCE_IMAGE, THB_SOURCE_BLEND, THB_SOURCE_FONT)) { | ||||
| /* only load if we didnt give an image */ | /* only load if we didn't give an image */ | ||||
| if (img == NULL) { | if (img == NULL) { | ||||
| switch (source) { | switch (source) { | ||||
| case THB_SOURCE_IMAGE: | case THB_SOURCE_IMAGE: | ||||
| img = IMB_loadiffname(file_path, IB_rect | IB_metadata, NULL); | img = IMB_loadiffname(file_path, IB_rect | IB_metadata, NULL); | ||||
| break; | break; | ||||
| case THB_SOURCE_BLEND: | case THB_SOURCE_BLEND: | ||||
| img = IMB_thumb_load_blend(file_path, blen_group, blen_id); | img = IMB_thumb_load_blend(file_path, blen_group, blen_id); | ||||
| break; | break; | ||||
| ▲ Show 20 Lines • Show All 343 Lines • Show Last 20 Lines | |||||