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:
authorJulian Eisel <julian@blender.org>2020-11-03 01:55:59 +0300
committerJulian Eisel <julian@blender.org>2020-11-03 02:00:41 +0300
commitc067b7460a1fb54dc6b21c3cbc2819d9398392ef (patch)
treef1c2c50728f1b222acf291fda719f438b1adbfbc /source/blender/editors/space_sequencer
parenta750acab78cf38ca8f010c4ac81ec948faa79dd5 (diff)
Fix C operators can't set default display or sort type for File Browser
`WM_operator_properties_filesel()` allows C operators to set a display or sort type for the File Browser to use. But the File Browser would always override that because of an invalid `_is_set()` check. (The operators don't actually set the value, they only set the property's default value.) The only operator affected by this is "Recover Auto Save". It is supposed to show a vertical list ordered chronologically. It used settings from the previous File Browser usage before this patch. Operators using the File Browser should generally use `FILE_DEFAULTDISPLAY`/`FILE_SORT_DEFAULT` now, except if they have a reason not to. See comments at their definition. ---- This makes it so operators that set a different display or sort type don't change the sort or display type for the next File Browser operation. So using "Recover Auto Save" entirely isolates display and sort type from other operations. Differential Revision: https://developer.blender.org/D8598 Reviewed by: Bastien Montagne
Diffstat (limited to 'source/blender/editors/space_sequencer')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_add.c6
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c
index 42abc97bebe..7cf5218cfaa 100644
--- a/source/blender/editors/space_sequencer/sequencer_add.c
+++ b/source/blender/editors/space_sequencer/sequencer_add.c
@@ -725,7 +725,7 @@ void SEQUENCER_OT_movie_strip_add(struct wmOperatorType *ot)
WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH | WM_FILESEL_FILES |
WM_FILESEL_SHOW_PROPS | WM_FILESEL_DIRECTORY,
FILE_DEFAULTDISPLAY,
- FILE_SORT_ALPHA);
+ FILE_SORT_DEFAULT);
sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME);
RNA_def_boolean(ot->srna, "sound", true, "Sound", "Load sound with the movie");
RNA_def_boolean(ot->srna,
@@ -780,7 +780,7 @@ void SEQUENCER_OT_sound_strip_add(struct wmOperatorType *ot)
WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH | WM_FILESEL_FILES |
WM_FILESEL_SHOW_PROPS | WM_FILESEL_DIRECTORY,
FILE_DEFAULTDISPLAY,
- FILE_SORT_ALPHA);
+ FILE_SORT_DEFAULT);
sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME);
RNA_def_boolean(ot->srna, "cache", false, "Cache", "Cache the sound in memory");
RNA_def_boolean(ot->srna, "mono", false, "Mono", "Merge all the sound's channels into one");
@@ -972,7 +972,7 @@ void SEQUENCER_OT_image_strip_add(struct wmOperatorType *ot)
WM_FILESEL_DIRECTORY | WM_FILESEL_RELPATH | WM_FILESEL_FILES |
WM_FILESEL_SHOW_PROPS | WM_FILESEL_DIRECTORY,
FILE_DEFAULTDISPLAY,
- FILE_SORT_ALPHA);
+ FILE_SORT_DEFAULT);
sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME | SEQPROP_ENDFRAME);
RNA_def_boolean(ot->srna,
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index 92449126d2c..e405864432a 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -3919,7 +3919,7 @@ void SEQUENCER_OT_change_path(struct wmOperatorType *ot)
WM_FILESEL_DIRECTORY | WM_FILESEL_RELPATH | WM_FILESEL_FILEPATH |
WM_FILESEL_FILES,
FILE_DEFAULTDISPLAY,
- FILE_SORT_ALPHA);
+ FILE_SORT_DEFAULT);
RNA_def_boolean(ot->srna,
"use_placeholders",
false,
@@ -4064,7 +4064,7 @@ void SEQUENCER_OT_export_subtitles(struct wmOperatorType *ot)
FILE_SAVE,
WM_FILESEL_FILEPATH,
FILE_DEFAULTDISPLAY,
- FILE_SORT_ALPHA);
+ FILE_SORT_DEFAULT);
}
/** \} */