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:
authorWilliam Reynish <billrey@me.com>2019-09-05 08:54:41 +0300
committerWilliam Reynish <billrey@me.com>2019-09-05 08:54:41 +0300
commitd813cc706d79daf84100f9090db5f11c917e50c0 (patch)
tree1119ce1e0a9c33a22963b5061542414b7f11fba6 /source/blender/editors/space_file/filelist.c
parent6fc6f2504dfdae50c8184185222350052be0775c (diff)
File Browser: Add Zip files as native recognised file type
Differential Revision: https://developer.blender.org/D5683 Reviewers: Brecht
Diffstat (limited to 'source/blender/editors/space_file/filelist.c')
-rw-r--r--source/blender/editors/space_file/filelist.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 46302e0d087..df783358625 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -1006,6 +1006,9 @@ static int filelist_geticon_ex(const int typeflag,
else if (typeflag & FILE_TYPE_TEXT) {
return ICON_FILE_TEXT;
}
+ else if (typeflag & FILE_TYPE_ARCHIVE) {
+ return ICON_FILE_ARCHIVE;
+ }
else if (typeflag & FILE_TYPE_BLENDERLIB) {
const int ret = UI_idcode_icon_get(blentype);
if (ret != ICON_NONE) {
@@ -2126,6 +2129,9 @@ int ED_path_extension_type(const char *path)
else if (BLI_path_extension_check(path, ".abc")) {
return FILE_TYPE_ALEMBIC;
}
+ else if (BLI_path_extension_check(path, ".zip")) {
+ return FILE_TYPE_ARCHIVE;
+ }
else if (BLI_path_extension_check_n(path, ".obj", ".3ds", ".fbx", ".glb", ".gltf", NULL)) {
return FILE_TYPE_OBJECT_IO;
}
@@ -2183,6 +2189,8 @@ int ED_file_extension_icon(const char *path)
return ICON_FILE_3D;
case FILE_TYPE_TEXT:
return ICON_FILE_TEXT;
+ case FILE_TYPE_ARCHIVE:
+ return ICON_FILE_ARCHIVE;
default:
return ICON_FILE_BLANK;
}