Blender Git Loki

Git Commits -> Revision 95b3c4c

Revision 95b3c4c by Julian Eisel (master)
December 8, 2020, 13:39 (GMT)
File Browser: Refactor access to the selection parameters struct

* Avoid direct access to `SpaceFile.params`, use a getter instead. This matters
because once the asset-browser changes are in, there will be an alternative
selection parameter object. The getter can return the correct one.
* Rename the function to ensure the parameters. The old name
`ED_fileselect_get_params()` wasn't a mere getter, it would create the
parameters if necessary. Now we have an actual getter, so better be clear.
* In some instances, I replaced the old "get" function with the new mere
getter. So the ensure logic is called less often. However, in these cases we
should be able to assume the selection parameters were created already as
part of the editor creation routine.

The term "active" in the new function names may seem a bit odd in the current
context, but that is a preparation for the Asset Browser merge as well. Like
said, there will be two file selection parameter objects in the space.

Commit Details:

Full Hash: 95b3c4c966f9baeb6f73b84568b7f03287e1a350
Parent Commit: 2a4fe88
Lines Changed: +257, -221

9 Modified Paths:

/source/blender/editors/include/ED_fileselect.h (+2, -2) (Diff)
/source/blender/editors/space_file/filelist.c (+2, -1) (Diff)
/source/blender/editors/space_file/filesel.c (+56, -48) (Diff)
/source/blender/editors/space_file/file_draw.c (+21, -21) (Diff)
/source/blender/editors/space_file/file_ops.c (+156, -143) (Diff)
/source/blender/editors/space_file/file_panels.c (+1, -1) (Diff)
/source/blender/editors/space_file/space_file.c (+3, -3) (Diff)
/source/blender/makesrna/intern/rna_space.c (+14, -1) (Diff)
/source/blender/windowmanager/intern/wm_operators.c (+2, -1) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021