[Bf-blender-cvs] [faccd880385] blender-v3.3-release: Fix T100887: Some C++ importers/exporters (e.g. OBJ) reset file dialog Sort By mode

Aras Pranckevicius noreply at git.blender.org
Wed Sep 21 14:27:09 CEST 2022


Commit: faccd880385b5ce61ca6aeacce65964becd469f5
Author: Aras Pranckevicius
Date:   Thu Sep 8 13:07:31 2022 +0300
Branches: blender-v3.3-release
https://developer.blender.org/rBfaccd880385b5ce61ca6aeacce65964becd469f5

Fix T100887: Some C++ importers/exporters (e.g. OBJ) reset file dialog Sort By mode

A couple years ago D8598 made it so that C++ operators generally
should use "default" sort mode, which remembers previously used sort
setting. Back then all the places that needed it got changed to use
this "default" one, but since then some more IO code landed, where
seemingly by accident it used "sort by file name":

- USD importer,
- Grease Pencil exporter,
- OBJ importer & exporter,
- STL importer.

Reviewed By: Julian Eisel
Differential Revision: https://developer.blender.org/D15906

===================================================================

M	source/blender/editors/io/io_gpencil_export.c
M	source/blender/editors/io/io_obj.c
M	source/blender/editors/io/io_stl_ops.c
M	source/blender/editors/io/io_usd.c

===================================================================

diff --git a/source/blender/editors/io/io_gpencil_export.c b/source/blender/editors/io/io_gpencil_export.c
index 3f905dd7de0..6db68a26232 100644
--- a/source/blender/editors/io/io_gpencil_export.c
+++ b/source/blender/editors/io/io_gpencil_export.c
@@ -233,7 +233,7 @@ void WM_OT_gpencil_export_svg(wmOperatorType *ot)
                                  FILE_SAVE,
                                  WM_FILESEL_FILEPATH | WM_FILESEL_SHOW_PROPS,
                                  FILE_DEFAULTDISPLAY,
-                                 FILE_SORT_ALPHA);
+                                 FILE_SORT_DEFAULT);
 
   gpencil_export_common_props_definition(ot);
 
@@ -391,7 +391,7 @@ void WM_OT_gpencil_export_pdf(wmOperatorType *ot)
                                  FILE_SAVE,
                                  WM_FILESEL_FILEPATH | WM_FILESEL_SHOW_PROPS,
                                  FILE_DEFAULTDISPLAY,
-                                 FILE_SORT_ALPHA);
+                                 FILE_SORT_DEFAULT);
 
   static const EnumPropertyItem gpencil_export_frame_items[] = {
       {GP_EXPORT_FRAME_ACTIVE, "ACTIVE", 0, "Active", "Include only active frame"},
diff --git a/source/blender/editors/io/io_obj.c b/source/blender/editors/io/io_obj.c
index 7c931def2e0..c61a34679bc 100644
--- a/source/blender/editors/io/io_obj.c
+++ b/source/blender/editors/io/io_obj.c
@@ -278,7 +278,7 @@ void WM_OT_obj_export(struct wmOperatorType *ot)
                                  FILE_SAVE,
                                  WM_FILESEL_FILEPATH | WM_FILESEL_SHOW_PROPS,
                                  FILE_DEFAULTDISPLAY,
-                                 FILE_SORT_ALPHA);
+                                 FILE_SORT_DEFAULT);
 
   /* Animation options. */
   RNA_def_boolean(ot->srna,
@@ -483,7 +483,7 @@ void WM_OT_obj_import(struct wmOperatorType *ot)
                                  FILE_OPENFILE,
                                  WM_FILESEL_FILEPATH | WM_FILESEL_SHOW_PROPS,
                                  FILE_DEFAULTDISPLAY,
-                                 FILE_SORT_ALPHA);
+                                 FILE_SORT_DEFAULT);
   RNA_def_float(
       ot->srna,
       "clamp_size",
diff --git a/source/blender/editors/io/io_stl_ops.c b/source/blender/editors/io/io_stl_ops.c
index 7db32cd6f18..ddf1bde0c1d 100644
--- a/source/blender/editors/io/io_stl_ops.c
+++ b/source/blender/editors/io/io_stl_ops.c
@@ -104,7 +104,7 @@ void WM_OT_stl_import(struct wmOperatorType *ot)
                                  WM_FILESEL_FILEPATH | WM_FILESEL_FILES | WM_FILESEL_DIRECTORY |
                                      WM_FILESEL_SHOW_PROPS,
                                  FILE_DEFAULTDISPLAY,
-                                 FILE_SORT_ALPHA);
+                                 FILE_SORT_DEFAULT);
 
   RNA_def_float(ot->srna, "global_scale", 1.0f, 1e-6f, 1e6f, "Scale", "", 0.001f, 1000.0f);
   RNA_def_boolean(ot->srna,
diff --git a/source/blender/editors/io/io_usd.c b/source/blender/editors/io/io_usd.c
index a59cdf60243..a33bd905a29 100644
--- a/source/blender/editors/io/io_usd.c
+++ b/source/blender/editors/io/io_usd.c
@@ -500,7 +500,7 @@ void WM_OT_usd_import(struct wmOperatorType *ot)
                                  FILE_OPENFILE,
                                  WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH | WM_FILESEL_SHOW_PROPS,
                                  FILE_DEFAULTDISPLAY,
-                                 FILE_SORT_ALPHA);
+                                 FILE_SORT_DEFAULT);
 
   RNA_def_float(
       ot->srna,



More information about the Bf-blender-cvs mailing list