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
path: root/source
diff options
context:
space:
mode:
authorYimingWu <xp8110@outlook.com>2019-09-05 10:06:33 +0300
committerYimingWu <xp8110@outlook.com>2019-09-05 10:06:33 +0300
commit5396e17fb842fa33d5043255b2397a7b4febf5a6 (patch)
tree502eaea846d030e4467aefc604b3bf814f9cc5d8 /source
parent4f1928c2ae8d35983a3e6f721cedee30ae918c2b (diff)
parentd813cc706d79daf84100f9090db5f11c917e50c0 (diff)
Merge remote-tracking branch 'origin/master' into temp-lanpr-staging
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/space_file/filelist.c8
-rw-r--r--source/blender/editors/space_file/filesel.c3
-rw-r--r--source/blender/makesdna/DNA_space_types.h2
-rw-r--r--source/blender/windowmanager/intern/wm_operator_props.c3
4 files changed, 15 insertions, 1 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;
}
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index 3223fe0c6ce..d683c9d5c98 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -199,6 +199,9 @@ short ED_fileselect_set_params(SpaceFile *sfile)
if ((prop = RNA_struct_find_property(op->ptr, "filter_text"))) {
params->filter |= RNA_property_boolean_get(op->ptr, prop) ? FILE_TYPE_TEXT : 0;
}
+ if ((prop = RNA_struct_find_property(op->ptr, "filter_archive"))) {
+ params->filter |= RNA_property_boolean_get(op->ptr, prop) ? FILE_TYPE_ARCHIVE : 0;
+ }
if ((prop = RNA_struct_find_property(op->ptr, "filter_folder"))) {
params->filter |= RNA_property_boolean_get(op->ptr, prop) ? FILE_TYPE_FOLDER : 0;
}
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 498ab290f31..2740d27e1af 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -828,7 +828,7 @@ typedef enum eFileSel_File_Types {
FILE_TYPE_FTFONT = (1 << 7),
FILE_TYPE_SOUND = (1 << 8),
FILE_TYPE_TEXT = (1 << 9),
- /* 1 << 10 was FILE_TYPE_MOVIE_ICON, got rid of this so free slot for future type... */
+ FILE_TYPE_ARCHIVE = (1 << 10),
/** represents folders for filtering */
FILE_TYPE_FOLDER = (1 << 11),
FILE_TYPE_BTX = (1 << 12),
diff --git a/source/blender/windowmanager/intern/wm_operator_props.c b/source/blender/windowmanager/intern/wm_operator_props.c
index de82c3942db..04775a7a880 100644
--- a/source/blender/windowmanager/intern/wm_operator_props.c
+++ b/source/blender/windowmanager/intern/wm_operator_props.c
@@ -156,6 +156,9 @@ void WM_operator_properties_filesel(wmOperatorType *ot,
ot->srna, "filter_text", (filter & FILE_TYPE_TEXT) != 0, "Filter text files", "");
RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
prop = RNA_def_boolean(
+ ot->srna, "filter_archive", (filter & FILE_TYPE_ARCHIVE) != 0, "Filter archive files", "");
+ RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
+ prop = RNA_def_boolean(
ot->srna, "filter_btx", (filter & FILE_TYPE_BTX) != 0, "Filter btx files", "");
RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
prop = RNA_def_boolean(