Blender Git Loki

Git Commits -> Revision c067b74

Revision c067b74 by Julian Eisel (master)
November 2, 2020, 23:00 (GMT)
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

Commit Details:

Full Hash: c067b7460a1fb54dc6b21c3cbc2819d9398392ef
Parent Commit: a750aca
Lines Changed: +157, -91

30 Modified Paths:

/source/blender/editors/curve/editfont.c (+2, -2) (Diff)
/source/blender/editors/io/io_alembic.c (+2, -2) (Diff)
/source/blender/editors/io/io_cache.c (+1, -1) (Diff)
/source/blender/editors/io/io_collada.c (+2, -2) (Diff)
/source/blender/editors/io/io_usd.c (+1, -1) (Diff)
/source/blender/editors/object/object_modifier.c (+1, -1) (Diff)
/source/blender/editors/object/object_volume.c (+1, -1) (Diff)
/source/blender/editors/physics/rigidbody_world.c (+1, -1) (Diff)
/source/blender/editors/screen/screendump.c (+1, -1) (Diff)
/source/blender/editors/sound/sound_ops.c (+3, -3) (Diff)
/source/blender/editors/space_buttons/buttons_ops.c (+2, -2) (Diff)
/source/blender/editors/space_clip/clip_ops.c (+1, -1) (Diff)
/source/blender/editors/space_file/filelist.c (+2, -3) (Diff)
/source/blender/editors/space_file/filesel.c (+48, -15) (Diff)
/source/blender/editors/space_file/file_ops.c (+10, -11) (Diff)
/source/blender/editors/space_graph/graph_edit.c (+1, -1) (Diff)
/source/blender/editors/space_image/image_ops.c (+3, -3) (Diff)
/source/blender/editors/space_info/info_ops.c (+1, -1) (Diff)
/source/blender/editors/space_node/node_add.c (+1, -1) (Diff)
/source/blender/editors/space_sequencer/sequencer_add.c (+3, -3) (Diff)
/source/blender/editors/space_sequencer/sequencer_edit.c (+2, -2) (Diff)
/source/blender/editors/space_text/text_ops.c (+2, -2) (Diff)
/source/blender/editors/space_view3d/view3d_edit.c (+1, -1) (Diff)
/source/blender/makesdna/DNA_space_types.h (+13, -1) (Diff)
/source/blender/makesrna/intern/rna_space.c (+17, -17) (Diff)
/source/blender/makesrna/RNA_enum_types.h (+1, -2) (Diff)
/source/blender/windowmanager/intern/wm_event_system.c (+1, -1) (Diff)
/source/blender/windowmanager/intern/wm_files.c (+3, -3) (Diff)
/source/blender/windowmanager/intern/wm_files_link.c (+4, -4) (Diff)
/source/blender/windowmanager/intern/wm_operator_props.c (+26, -2) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021