2010-06-04 11:34:57 +00:00
|
|
|
# ***** BEGIN GPL LICENSE BLOCK *****
|
|
|
|
|
#
|
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
|
# of the License, or (at your option) any later version.
|
|
|
|
|
#
|
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
|
#
|
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
|
# along with this program; if not, write to the Free Software Foundation,
|
|
|
|
|
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
|
# ***** END GPL LICENSE BLOCK *****
|
|
|
|
|
|
|
|
|
|
set(INC
|
2010-09-18 03:55:56 +00:00
|
|
|
../include
|
2010-06-04 20:56:56 +00:00
|
|
|
../../blenfont
|
|
|
|
|
../../blenkernel
|
|
|
|
|
../../blenlib
|
2010-06-04 11:34:57 +00:00
|
|
|
../../blenloader
|
2015-08-16 17:32:01 +10:00
|
|
|
../../blentranslation
|
2014-10-07 15:46:19 -05:00
|
|
|
../../gpu
|
2019-04-24 14:39:31 +10:00
|
|
|
../../imbuf
|
2010-06-04 20:56:56 +00:00
|
|
|
../../makesdna
|
|
|
|
|
../../makesrna
|
2020-11-06 10:10:18 -05:00
|
|
|
../../render
|
2011-07-17 09:11:13 +00:00
|
|
|
../../windowmanager
|
Final 'FileBrowser First Stage' merge.
It basically rewrites most of filelist.c, with some more limited changes in other areas of filebrowser.
From user perspective, it:
* Removes some info in 'long' drawing mode (owner, permissions) - OS-specific data that do not really matter in Blender!
* Makes short/long display 'fixed' size (among four choices, like thumbnails mode).
* Allows to list several layers of dirtree at once, in a flat way (inside .blend files and/or real directories).
* Consequently, adds datablocks types filtering.
* Uses way less RAM when listing big directories, especially in thumbnail mode (we are talking of several hundred of MiB spared).
* Generates thumbnails way faster.
From code perspective, it:
* Is ready for asset engine needs (on data structure level in filebrowser's listing).
* Simplifies and makes 'generic' file listing much lighter.
* Separates file listing in three different aspects:
** 'generic' filelisting (in BLI), which becomes a shallow wrapper around stat struct.
** 'filebrowser drawing' filelisting, which only contains current visible subset of the whole list (sliding window), with extra drawing data (strings for size, date/time, preview, etc.).
** 'asset-ready' filelisting, which is used for operations common to 'basic' filehandling and future asset-related one.
* Uses uuid's to handle file selection/state in the browser, instead of using flags in filelisting items.
* Uses much lighter BLI_task handling for previews, instead of heavy 'job' system (using the new 'notifier' timer to handle UI refresh, in similar way to jobs).
* Moves .blend datablocks preview handling to IMB_thumbnail (necessary to avoid storing all datablock previews at once, and gives better consistency and performances too).
Revision: https://developer.blender.org/D1316
Thanks to Campbell & Sergey for the reviews. :)
2015-08-19 22:41:39 +02:00
|
|
|
../../../../intern/atomic
|
2014-10-07 15:46:19 -05:00
|
|
|
../../../../intern/glew-mx
|
2019-04-24 14:39:31 +10:00
|
|
|
../../../../intern/guardedalloc
|
2011-05-31 01:15:44 +00:00
|
|
|
)
|
|
|
|
|
|
2010-10-23 04:05:55 +00:00
|
|
|
set(SRC
|
|
|
|
|
file_draw.c
|
|
|
|
|
file_ops.c
|
|
|
|
|
file_panels.c
|
File Browser Arrow Keys Navigation
Adds support for selecting/deselecting files in File Browser using the
arrow keys. All directions (up, down, left, right) are possible.
When to Select, When to Deselect?
Standard behaviour is selecting, however if we move into a block of
already selected files (meaning 2+ files are selected) we start
deselecting
Possible Selection Methods
Simple selection (arrow-key): All other files are deselected
Expand selection (Shift+arrow key): Add to/remove from existing
selection
ill-Expand selection (Ctrl+Shift+arrow key): Add to/remove from existing
selection and fill everything in-between
From which file do we start navigating?
From each available selection method (Mouse-, Walk-, All-, Border
Select), we use the last selected file. If there's no selection at all
we use the first (down/right arrow) or last (up/left arrow) file.
(Ideally, the view would automatically be set to the new selection, but
this behaviour overlaps with an other patch I've been working on, so
prefer to do that separately)
(Also tweaks color for highlighted file for better feedback)
D1297, Review done by @campbellbarton, thx a lot :)
2015-06-11 17:20:29 +02:00
|
|
|
file_utils.c
|
2010-10-23 04:05:55 +00:00
|
|
|
filelist.c
|
|
|
|
|
filesel.c
|
|
|
|
|
fsmenu.c
|
|
|
|
|
space_file.c
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2010-11-29 04:35:56 +00:00
|
|
|
file_intern.h
|
|
|
|
|
filelist.h
|
|
|
|
|
fsmenu.h
|
2010-10-23 04:05:55 +00:00
|
|
|
)
|
|
|
|
|
|
2019-04-14 15:18:44 +02:00
|
|
|
set(LIB
|
|
|
|
|
)
|
|
|
|
|
|
2011-06-05 07:55:18 +00:00
|
|
|
if(WITH_HEADLESS)
|
|
|
|
|
add_definitions(-DWITH_HEADLESS)
|
2019-12-10 23:12:47 +11:00
|
|
|
else()
|
|
|
|
|
list(APPEND LIB
|
|
|
|
|
bf_editor_datafiles
|
|
|
|
|
)
|
2011-06-05 07:55:18 +00:00
|
|
|
endif()
|
|
|
|
|
|
2010-08-03 11:25:34 +00:00
|
|
|
if(WITH_IMAGE_OPENEXR)
|
2010-06-04 11:34:57 +00:00
|
|
|
add_definitions(-DWITH_OPENEXR)
|
2010-08-03 11:25:34 +00:00
|
|
|
endif()
|
2010-06-04 11:34:57 +00:00
|
|
|
|
2013-10-12 23:56:21 +00:00
|
|
|
if(WITH_OPENIMAGEIO)
|
|
|
|
|
add_definitions(-DWITH_OPENIMAGEIO)
|
2013-10-08 21:17:24 +00:00
|
|
|
endif()
|
|
|
|
|
|
2010-08-03 11:25:34 +00:00
|
|
|
if(WITH_IMAGE_TIFF)
|
2010-06-04 11:34:57 +00:00
|
|
|
add_definitions(-DWITH_TIFF)
|
2010-08-03 11:25:34 +00:00
|
|
|
endif()
|
2010-06-04 11:34:57 +00:00
|
|
|
|
2010-08-03 11:25:34 +00:00
|
|
|
if(WITH_IMAGE_OPENJPEG)
|
2010-06-04 11:34:57 +00:00
|
|
|
add_definitions(-DWITH_OPENJPEG)
|
2010-08-03 11:25:34 +00:00
|
|
|
endif()
|
2010-06-04 11:34:57 +00:00
|
|
|
|
2010-08-03 11:25:34 +00:00
|
|
|
if(WITH_IMAGE_DDS)
|
2010-06-04 20:56:56 +00:00
|
|
|
add_definitions(-DWITH_DDS)
|
2010-08-03 11:25:34 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if(WITH_IMAGE_CINEON)
|
|
|
|
|
add_definitions(-DWITH_CINEON)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
if(WITH_IMAGE_HDR)
|
|
|
|
|
add_definitions(-DWITH_HDR)
|
|
|
|
|
endif()
|
2010-06-04 11:34:57 +00:00
|
|
|
|
2012-03-17 12:07:58 +00:00
|
|
|
if(WITH_INTERNATIONAL)
|
|
|
|
|
add_definitions(-DWITH_INTERNATIONAL)
|
|
|
|
|
endif()
|
|
|
|
|
|
2014-10-07 15:46:19 -05:00
|
|
|
|
2012-12-20 07:57:26 +00:00
|
|
|
if(WITH_FREESTYLE)
|
|
|
|
|
add_definitions(-DWITH_FREESTYLE)
|
|
|
|
|
endif()
|
|
|
|
|
|
2019-04-14 15:18:44 +02:00
|
|
|
blender_add_lib(bf_editor_space_file "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|