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:
authorCampbell Barton <ideasman42@gmail.com>2018-06-17 17:18:15 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-06-17 17:18:15 +0300
commit56173e512cab020a5bc96e6d3069641a03d47fbe (patch)
tree112fcb93a1898fadb34c2b74ae32471a6364a969 /source/blender/editors
parent6855d537e3112f7ba4d84524d06a524b0ea9f7b1 (diff)
parenta0a1fc89387f0f1396b5e4320c2dd4a6fedd1c25 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/interface/interface_icons.c2
-rw-r--r--source/blender/editors/io/io_alembic.c6
-rw-r--r--source/blender/editors/io/io_cache.c2
-rw-r--r--source/blender/editors/io/io_collada.c8
-rw-r--r--source/blender/editors/screen/screendump.c2
-rw-r--r--source/blender/editors/sound/sound_ops.c6
-rw-r--r--source/blender/editors/space_file/filelist.c24
-rw-r--r--source/blender/editors/space_image/image_ops.c2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c4
9 files changed, 28 insertions, 28 deletions
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index be76af34489..91ace3e69a2 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -602,7 +602,7 @@ static void init_iconfile_list(struct ListBase *list)
if ((dir[i].type & S_IFREG)) {
const char *filename = dir[i].relname;
- if (BLI_testextensie(filename, ".png")) {
+ if (BLI_path_extension_check(filename, ".png")) {
/* loading all icons on file start is overkill & slows startup
* its possible they change size after blender load anyway. */
#if 0
diff --git a/source/blender/editors/io/io_alembic.c b/source/blender/editors/io/io_alembic.c
index 4440b99f211..91fc1e9fe6a 100644
--- a/source/blender/editors/io/io_alembic.c
+++ b/source/blender/editors/io/io_alembic.c
@@ -86,7 +86,7 @@ static int wm_alembic_export_invoke(bContext *C, wmOperator *op, const wmEvent *
BLI_strncpy(filepath, BKE_main_blendfile_path(bmain), sizeof(filepath));
}
- BLI_replace_extension(filepath, sizeof(filepath), ".abc");
+ BLI_path_extension_replace(filepath, sizeof(filepath), ".abc");
RNA_string_set(op->ptr, "filepath", filepath);
}
@@ -284,8 +284,8 @@ static bool wm_alembic_export_check(bContext *UNUSED(C), wmOperator *op)
char filepath[FILE_MAX];
RNA_string_get(op->ptr, "filepath", filepath);
- if (!BLI_testextensie(filepath, ".abc")) {
- BLI_ensure_extension(filepath, FILE_MAX, ".abc");
+ if (!BLI_path_extension_check(filepath, ".abc")) {
+ BLI_path_extension_ensure(filepath, FILE_MAX, ".abc");
RNA_string_set(op->ptr, "filepath", filepath);
return true;
}
diff --git a/source/blender/editors/io/io_cache.c b/source/blender/editors/io/io_cache.c
index b13eaced843..221142a6cf8 100644
--- a/source/blender/editors/io/io_cache.c
+++ b/source/blender/editors/io/io_cache.c
@@ -61,7 +61,7 @@ static int cachefile_open_invoke(bContext *C, wmOperator *op, const wmEvent *eve
Main *bmain = CTX_data_main(C);
BLI_strncpy(filepath, BKE_main_blendfile_path(bmain), sizeof(filepath));
- BLI_replace_extension(filepath, sizeof(filepath), ".abc");
+ BLI_path_extension_replace(filepath, sizeof(filepath), ".abc");
RNA_string_set(op->ptr, "filepath", filepath);
}
diff --git a/source/blender/editors/io/io_collada.c b/source/blender/editors/io/io_collada.c
index aca380c3123..8f05495bb7f 100644
--- a/source/blender/editors/io/io_collada.c
+++ b/source/blender/editors/io/io_collada.c
@@ -72,7 +72,7 @@ static int wm_collada_export_invoke(bContext *C, wmOperator *op, const wmEvent *
else
BLI_strncpy(filepath, blendfile_path, sizeof(filepath));
- BLI_replace_extension(filepath, sizeof(filepath), ".dae");
+ BLI_path_extension_replace(filepath, sizeof(filepath), ".dae");
RNA_string_set(op->ptr, "filepath", filepath);
}
@@ -119,7 +119,7 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op)
}
RNA_string_get(op->ptr, "filepath", filepath);
- BLI_ensure_extension(filepath, sizeof(filepath), ".dae");
+ BLI_path_extension_ensure(filepath, sizeof(filepath), ".dae");
/* Avoid File write exceptions in Collada */
@@ -337,8 +337,8 @@ static bool wm_collada_export_check(bContext *UNUSED(C), wmOperator *op)
char filepath[FILE_MAX];
RNA_string_get(op->ptr, "filepath", filepath);
- if (!BLI_testextensie(filepath, ".dae")) {
- BLI_ensure_extension(filepath, FILE_MAX, ".dae");
+ if (!BLI_path_extension_check(filepath, ".dae")) {
+ BLI_path_extension_ensure(filepath, FILE_MAX, ".dae");
RNA_string_set(op->ptr, "filepath", filepath);
return true;
}
diff --git a/source/blender/editors/screen/screendump.c b/source/blender/editors/screen/screendump.c
index 7e50f8d41c4..e7b075dd5d0 100644
--- a/source/blender/editors/screen/screendump.c
+++ b/source/blender/editors/screen/screendump.c
@@ -234,7 +234,7 @@ static int screenshot_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(
char filepath[FILE_MAX] = "//screen";
if (G.relbase_valid) {
BLI_strncpy(filepath, BKE_main_blendfile_path_from_global(), sizeof(filepath));
- BLI_replace_extension(filepath, sizeof(filepath), ""); /* strip '.blend' */
+ BLI_path_extension_replace(filepath, sizeof(filepath), ""); /* strip '.blend' */
}
RNA_string_set(op->ptr, "filepath", filepath);
diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c
index b7a80a92998..049feea2d8a 100644
--- a/source/blender/editors/sound/sound_ops.c
+++ b/source/blender/editors/sound/sound_ops.c
@@ -455,10 +455,10 @@ static bool sound_mixdown_check(bContext *UNUSED(C), wmOperator *op)
prop = RNA_struct_find_property(op->ptr, "filepath");
RNA_property_string_get(op->ptr, prop, filepath);
- if (BLI_testextensie_array(filepath, snd_ext_sound))
- check = BLI_replace_extension(filepath, FILE_MAX, extension);
+ if (BLI_path_extension_check_array(filepath, snd_ext_sound))
+ check = BLI_path_extension_replace(filepath, FILE_MAX, extension);
else
- check = BLI_ensure_extension(filepath, FILE_MAX, extension);
+ check = BLI_path_extension_ensure(filepath, FILE_MAX, extension);
if (!check)
return check;
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 8123bed541c..658725879cb 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -1973,31 +1973,31 @@ int ED_path_extension_type(const char *path)
else if (file_is_blend_backup(path)) {
return FILE_TYPE_BLENDER_BACKUP;
}
- else if (BLI_testextensie(path, ".app")) {
+ else if (BLI_path_extension_check(path, ".app")) {
return FILE_TYPE_APPLICATIONBUNDLE;
}
- else if (BLI_testextensie(path, ".py")) {
+ else if (BLI_path_extension_check(path, ".py")) {
return FILE_TYPE_PYSCRIPT;
}
- else if (BLI_testextensie_n(path, ".txt", ".glsl", ".osl", ".data", ".pov", ".ini", ".mcr", ".inc", NULL)) {
+ else if (BLI_path_extension_check_n(path, ".txt", ".glsl", ".osl", ".data", ".pov", ".ini", ".mcr", ".inc", NULL)) {
return FILE_TYPE_TEXT;
}
- else if (BLI_testextensie_n(path, ".ttf", ".ttc", ".pfb", ".otf", ".otc", NULL)) {
+ else if (BLI_path_extension_check_n(path, ".ttf", ".ttc", ".pfb", ".otf", ".otc", NULL)) {
return FILE_TYPE_FTFONT;
}
- else if (BLI_testextensie(path, ".btx")) {
+ else if (BLI_path_extension_check(path, ".btx")) {
return FILE_TYPE_BTX;
}
- else if (BLI_testextensie(path, ".dae")) {
+ else if (BLI_path_extension_check(path, ".dae")) {
return FILE_TYPE_COLLADA;
}
- else if (BLI_testextensie(path, ".abc")) {
+ else if (BLI_path_extension_check(path, ".abc")) {
return FILE_TYPE_ALEMBIC;
}
- else if (BLI_testextensie_array(path, imb_ext_image)) {
+ else if (BLI_path_extension_check_array(path, imb_ext_image)) {
return FILE_TYPE_IMAGE;
}
- else if (BLI_testextensie(path, ".ogg")) {
+ else if (BLI_path_extension_check(path, ".ogg")) {
if (IMB_isanim(path)) {
return FILE_TYPE_MOVIE;
}
@@ -2005,10 +2005,10 @@ int ED_path_extension_type(const char *path)
return FILE_TYPE_SOUND;
}
}
- else if (BLI_testextensie_array(path, imb_ext_movie)) {
+ else if (BLI_path_extension_check_array(path, imb_ext_movie)) {
return FILE_TYPE_MOVIE;
}
- else if (BLI_testextensie_array(path, imb_ext_audio)) {
+ else if (BLI_path_extension_check_array(path, imb_ext_audio)) {
return FILE_TYPE_SOUND;
}
return 0;
@@ -2233,7 +2233,7 @@ static int filelist_readjob_list_dir(
/* Otherwise, do not check extensions for directories! */
else if (!(entry->typeflag & FILE_TYPE_DIR)) {
entry->typeflag = file_extension_type(root, entry->relpath);
- if (filter_glob[0] && BLI_testextensie_glob(entry->relpath, filter_glob)) {
+ if (filter_glob[0] && BLI_path_extension_check_glob(entry->relpath, filter_glob)) {
entry->typeflag |= FILE_TYPE_OPERATOR;
}
}
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index 44ff1086e27..b852788f3bb 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -1538,7 +1538,7 @@ static int image_replace_exec(bContext *C, wmOperator *op)
BKE_image_signal(bmain, sima->image, &sima->iuser, IMA_SIGNAL_SRC_CHANGE);
}
- if (BLI_testextensie_array(str, imb_ext_movie))
+ if (BLI_path_extension_check_array(str, imb_ext_movie))
sima->image->source = IMA_SRC_MOVIE;
else
sima->image->source = IMA_SRC_FILE;
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index b24817f2af8..a78b3ee79c1 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -3874,7 +3874,7 @@ static int sequencer_export_subtitles_invoke(bContext *C, wmOperator *op, const
else
BLI_strncpy(filepath, BKE_main_blendfile_path(bmain), sizeof(filepath));
- BLI_replace_extension(filepath, sizeof(filepath), ".srt");
+ BLI_path_extension_replace(filepath, sizeof(filepath), ".srt");
RNA_string_set(op->ptr, "filepath", filepath);
}
@@ -3899,7 +3899,7 @@ static int sequencer_export_subtitles_exec(bContext *C, wmOperator *op)
}
RNA_string_get(op->ptr, "filepath", filepath);
- BLI_ensure_extension(filepath, sizeof(filepath), ".srt");
+ BLI_path_extension_ensure(filepath, sizeof(filepath), ".srt");
/* Avoid File write exceptions */
if (!BLI_exists(filepath)) {