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
AgeCommit message (Collapse)Author
2016-06-27Fix (unreported) potential buffer overflow with BLO_library_path_explode() ↵Bastien Montagne
usage. Also added warning to func doc, let's try to avoid this in future (for until we pass string length systematically...).
2016-06-14FileSpace cleanup: make ED_path_extension_type public.Bastien Montagne
Maybe we should move it to BLI, but not sure how, and where (and its defines are SpaceFile's ones, meh :| ).
2016-05-08Cleanup: warningsCampbell Barton
2016-01-27Fix T47252: FileBrowser: buffer overflow with scripts defining too long ↵Bastien Montagne
'filter_glob' string. Fixed this with three changes: * filter_glob is now 255 char max (63 could be a bit limited in some rare cases). * IO templates now explicitely define max len of that property (such that scripters are aware of the limit). * ED_fileselect_set_params() is now safe regarding too long strings from a 'filter_glob' op property.
2015-12-21Cleanup: warnings (msvc)Campbell Barton
Part of patch D1670 by @LazyDodo
2015-11-27Fix T46827: Appending Specific Groups Doesn't Work on Windows.Bastien Montagne
Issue was with datablocks which names would include '/', new filebrowser filelisting code would cleanup the entire filepath, hence giving invalid filename in this case. That 'path separator in ID names' bit us already in lib/datatype/datablock separating func, this is really stupid to allow that in something handled as a filepath imho, but well... Note: would have break the same under *nix with '\' char.
2015-11-05Cleanup: comments/styleCampbell Barton
2015-11-02Filebrowser: fix preview handling to make correct use of task scheduler.Bastien Montagne
We needed the 'background' feature here, since we never wait on those preview-generation tasks. Note that it also simplifies the code, and as usual testing is needed here on all possible platforms...
2015-10-03Cleanup: styleCampbell Barton
2015-09-30Fix T46331: File open does not show thumbnails, when a filter_glob is ↵Bastien Montagne
provided by python scripts. No reason to exclude usual file-type 'guessing' for operator-filtered extensions... Safe for 2.76, should we need to merge more fixes.
2015-09-15Fix T46093: Thumbnails/previews of materials/textures not displaying in ↵Bastien Montagne
Blender filebrowser when only one thread is available. Using the global scheduler here is not a really good idea - `filelist_cache_previewf()` is not a short task that run once, but it's a loop that keeps cheking for work in a TODO queue. This means it won't quickly allow other tasks to start, so it should not be in the global scheduler. In fact, asynchronous tasks (that is, tasks that will live for quite a bit of time, and often sleep a lot) should never use global scheduler, they would steal computing resources from heavy-duty, short-time living ones - and possibly even completely stall threaded tasks (if all worker threads are executing long-life tasks...). We could probably even completely bypass the scheduler/task thing here (and directly use threads), but it does not have that much of an over-head, and still offers easy handling of threading stuff...
2015-09-13Cleanup: spellingCampbell Barton
2015-09-10Fix T46070: Content of folders with a .blend extension aren't listed until ↵Bastien Montagne
filtering is disabled. Own stupid mistake somewhere during filebrowser revamp...
2015-09-09Fix broken logic in new FileBrowser caching of entries.Bastien Montagne
We were still using main borwser's FileDirEntryArr to own memory of entries currently in cache. That was OK for common caching operation, but if was not released when clearing cache! Nothing dramatic, since that was cleared too, but less often, so e.g. by changing sorting options you could pile up more and more no-more-used entries there... Anyway, there is no reason to do that, much more sound and clean to keep everything cache-related in dedicated FileDirEntryCache struct. This means main borwser's FileDirEntryArr is now always expected to not store any actual entry! Note: this can probably be cleaned up a bit more, but would wait after 2.76 for this!
2015-09-02Cleanup: styleCampbell Barton
2015-08-24Fix some issues from lates coverity scan.Bastien Montagne
Unlikely, but still valid.
2015-08-20Minor cleanup (BLI_cleanup_dir already adds trailing slash, and correct a ↵Bastien Montagne
false-positive assert).
2015-08-20Cleanup: whitespaceCampbell Barton
2015-08-20FileBrowser: Fix some minor issue with fileentries creation.Bastien Montagne
An entry could already exist in misc cache, when creating it for block cache, leading to double-creation. Issue was not that serious (no memleak or so), but nasty still. Thanks to Severin for notifying the assert.
2015-08-20Fix 32bit builds... :/Bastien Montagne
2015-08-19Final 'FileBrowser First Stage' merge.Bastien Montagne
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-18Replace 'BLO_is_a_library' by 'BLO_library_path_explode'.Bastien Montagne
This new func will be fully used by upcomming code (it mostly adds the extraction of library item name as well as library file and ID group).
2015-07-11Use const for direntry stringsCampbell Barton
2015-06-12BLI_linklist, avoid full list search for appendCampbell Barton
For areas that require append, store the last node, Previous behavior would too easily hide poorly performing code. Also avoid (prepend, reverse) where possible.
2015-05-15Fix some issues found by Coverity ScanJulian Eisel
Some of them are just brain dead code, some are potential bugs.
2015-04-29File browser - change thumbnails size with a sliderBastien Montagne
We can now scale from 32px up to 256px (default has been upgraded to 128px). Thumbnails are now generated as 'large', i.e. 256px. Previews are scaled up if necessary, unlike icons (for folders or files without preview images). Note that .blend thumbnails themselves remain in 128px for now (they are embeded in .blend files, not quite sure we want to make them four times bigger...). Patch by DMS (Yaron Dames), with final edits by myself. Reviewers: mont29 Subscribers: Severin, mont29 Differential Revision: https://developer.blender.org/D1260
2015-04-08Fix T44113: Some System Folders do not contain go back arrow.Bastien Montagne
On windows empty dirs are completely empty - no par or current entries are listed either, in those cases artificially add those. Furthermore, stat on UNC paths do not support current/parent 'shortcuts' (i.e. things like '\\SERVER\foo\bar\..' do not work), so we have to hack around that mess... This should ensure us we always do have valid parrent entry...
2015-04-08FileBrowser previews: Get rid of ugly, stupid and confusing ↵Bastien Montagne
'FILE_TYPE_ICON_MOVIE' hack. Was only handling failures in video thumbnails, was confusing (giving two different types for video files, *sigh*), and... useless, since thumbnail code already handles smartly failures in preview generation!
2015-04-08Font preview for file browserCampbell Barton
D1002 by @plasmasolutions, with own refactoring. Note, needed to do a bad-level call here (IMB -> BLF) Also can't use the BLF API directly because its not thread-safe. So keep the function isolated (blf_thumbs.c).
2015-02-15Cleanup of SpaceFile, from asset-experiments branch mostly.Bastien Montagne
Helps keeping diff with branch relevant and clean...
2015-02-15Fix for previous commit, sorry for the noise.Bastien Montagne
2015-02-09SpaceFile: rework filelist_find, was looping way too much.Bastien Montagne
2015-01-26Cleanup: current/parent paths: add helpers in BLI_path_utils.Bastien Montagne
Also, avoid calling ugly strcmp with '.' or '..', making direct char checks is much cheaper here!
2015-01-26Cleanup: strcmp/strncmp -> STREQ/STREQLEN (in boolean usage).Bastien Montagne
Makes usage of those funcs much more clear, we even had mixed '!strcmp(foo, bar)' and 'strcmp(foo, bar) == 0' in several places...
2015-01-07cleanup: de-duplicate codeCampbell Barton
2015-01-06cleanup: warningsCampbell Barton
2015-01-04Partial fix for T43113: Filebrowser: Empty folders do not contain go back arrow.Bastien Montagne
Do not allow going into un-readable directories at all. Note we might want to reflect that 'state' in UI for users too, but that will be for later. Also, not quite sure this fix the windows case, will have to start my VM... :/
2015-01-04FileBrowser: Cleanup: rename some (really ugly) enum names.Bastien Montagne
2015-01-03FileBrowser: add search field in header bar.Bastien Montagne
Not much to add, pretty straightforward...
2015-01-03Cleanup: rename 'filelist' BLI funcs to consistent naming.Bastien Montagne
Also, add an optional callback to `BLI_filelist_free()` to allow freein void poin if needed (consistency with `BLI_filelist_duplicate()`...).
2015-01-01SpaceFile: Cleanup: fix stupid indices in `filelist_from_main()`Bastien Montagne
Dead code (currently), but still...
2015-01-01SpaceFile: Tweak thumbnail to avoid restarting the job needlessly.Bastien Montagne
2015-01-01SpaceFile: Refactor sorting and filtering of filelist.Bastien Montagne
New code shall be more easy to maintain and extend. Sorting is now handled quite the same as filtering, and all filtering parameters are now packed into a sub-struct to help extending it later. Also done some optimizations in filelist refresh, and sorting/filtering area. Now we should avoid re-sorting and re-filtering too often, also removed calls to those in read_xxx funcs. Note thumbnail job is still started basically on each call to `file_refresh()`, will be addressed in next commit.
2015-01-01SpaceFile: Filelist: reorder a bit things, also cleanup some unused and ↵Bastien Montagne
pure-private funcs.
2014-12-04Cleanup: minor int->bool cleanup.Bastien Montagne
2014-04-30Code cleanup: remove unused includesCampbell Barton
Opted to keep includes if they are used indirectly (even if removing is possible).
2014-04-26Code cleanup: use 'const' for arrays (editors)Campbell Barton
2014-04-01Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT defineCampbell Barton
2014-02-17Suppress assert in debug mode.Campbell Barton
2014-02-05Code cleanup: use bool for static methodsCampbell Barton