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
2021-05-19Fix T87621: Win32 Do Not Create Preview Thumbnails for Offline FilesHarley Acheson
This patch turns off the creation of file thumbnails for files that are offline and therefore not fully-present on the file system. These types of files - typically cloud-based or stored on slower backup media - only have their contents available when actually accessed, at which point there will be a short delay. If we allow thumbnail creation in this state then all offline files in a folder will be downloaded just to view a listing, which can take a long time. Files in this state will instead get a more generic thumbnail that still indicates file type (icon in center) and that shows offline state will a special icon at the bottom-left. Although this currently only affects Windows users, most of this patch is platform-agnostic. So other platforms inherit this behavior if they only add FILE_ATTR_OFFLINE attribute to files in this state. See D11101 for more information. Differential Revision: https://developer.blender.org/D11101 Reviewed by Julian Eisel
2021-02-05Cleanup: correct spelling in commentsCampbell Barton
2021-01-20Cleanup: remove extra in trailing asteriskCampbell Barton
Comment blocks not conforming to convention.
2020-10-09Cleanup: alias: use const, remove unused variable.Ankit Meel
`targetIsDirectory` slipped through the code review of {D6679}/{rBafb1a64ccb81}. `BLI_is_dir` exists to check for directory status of a file. Remove some `else-after-return`s. Use `r_` prefix for return value arguments, and move it to the end in the list of arguments.
2020-09-04Cleanup: Clang-Tidy readability-inconsistent-declaration-parameter-name fixSebastian Parborg
No functional changes
2020-08-07Code Style: use "#pragma once" in source directoryJacques Lucke
This replaces header include guards with `#pragma once`. A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`), because they are used in other places. This patch has been generated by P1561 followed by `make format`. Differential Revision: https://developer.blender.org/D8466
2020-07-13Cleanup: remove some incorrectly placed constsJacques Lucke
Clang-tidy reported that those parameters could be const, but that is not true on windows.
2020-07-13Clang Tidy: enable readability-non-const-parameter warningJacques Lucke
Clang Tidy reported a couple of false positives. I disabled those `NOLINTNEXTLINE`. Differential Revision: https://developer.blender.org/D8199
2020-05-08Cleanup: take includes out of 'extern "C"' blocksJacques Lucke
Surrounding includes with an 'extern "C"' block is not necessary anymore. Also that made it harder to add any C++ code to some headers, or include headers that have "optional" C++ code like `MEM_guardedalloc.h`. I tested compilation on linux and windows (and got help from @LazyDodo). If this still breaks compilation due to some linker error, the header containing the symbol in question is probably missing an 'extern "C"' block. Differential Revision: https://developer.blender.org/D7653
2020-03-26Fix T60682: adds macOS alias redirection for directoriesBrecht Van Lommel
This adds support for macOS aliases in addition to symlinks. It also adds support for hidden, readonly and system file attributes. Contributed by Ankit (ankitm) with modifications by me. Differential Revision: https://developer.blender.org/D6679
2020-03-19VSE: Disk cacheRichard Antalik
This patch implements dumping images from cache to HDD. The main goal of this system is to provide a means to achieve consistent playback speed mainly for strips that are not possible to preview in real time. How to use: Disk cache has own settings in user preferences for path to storage, size limit and compression level. To use disk cache, you need to check `Use Disk Cache` box, set `Disk Cache Directory`, `Disk Cache Limit` and save or open existing .blend file. By default sequencer output will be cached only. Manual setting is possible in cache panel. Uses: - Replacement or alternative for proxies. Disk cache will work with any strip type, supports float images as well. - Storage for strip thumbnails. - Less RAM needs to be allocated for preview cache How it works: Disk cache is extension of RAM cache. Every image, that is stored or deleted in RAM will be stored or deleted on HDD as well. Images can be compressed to save space and for use on slower drives. Compressed images are slower to write and read though. Images are stored in bulk of 100 rendered frames per one file. This is to overcome slow file access time for large amount of files. Drawback is, that if one frame needs to be redrawn, all 100 frames are deleted. Reviewed By: sergey Differential Revision: https://developer.blender.org/D5524
2020-03-18Cleanup: 64 bit file IO on windows.Ray Molenkamp
Unlike Linux where fseek/tell will be either 32 or 64 bit depending on the target platform, it will always be 32 bit on windows. We had some macro magic in BLI_winstuff.h that substituted them for 64 bit versions, but that is upsetting the system headers if they get included after BLI_winstuff.h which is problematic for D6811. This diff adds proper functions in blenlib and updates all calls that were using the BLI_winstuff.h header to gain 64 bit file IO. note: Anything that was using the 32 bit versions (ie not including BLI_winstuff.h) will still be using the 32 bit versions, which is perhaps a good code quality Friday project. Differential Revision: https://developer.blender.org/D7160 Reviewers: brecht dfelinto
2020-03-06Cleanup: Fix forward declaration of headersDalai Felinto
2020-02-26BLI_fileops: add utility to read text with newlines set to nilCampbell Barton
2020-02-21UI: Windows File Attributes and Hidden ItemsHarley Acheson
File Browser using Windows file attributes for decorating and hiding items. Differential Revision: https://developer.blender.org/D6816 Reviewed by Campbell Barton
2019-11-06Fix T70952: EXR files bigger than 2GB don't open on WindowsBrecht Van Lommel
2019-10-10File Browser: add back Delete, which now moves files to the trashRobert Guetzkow
In Blender 2.7 delete would permanently delete files, now this function is back but using more standard behavior. This patch includes code contributed by Kris (Metricity). Differential Revision: https://developer.blender.org/D4585
2019-09-03UI: File Browser Design OverhaulJulian Eisel
This is a general redesign of the File Browser GUI and interaction methods. For screenshots, check patch D5601. Main changes in short: * File Browser as floating window * New layout of regions * Popovers for view and filter options * Vertical list view with interactive column header * New and updated icons * Keymap consistency fixes * Many tweaks and fixes to the drawing of views ---- General: * The file browser now opens as temporary floating window. It closes on Esc. The header is hidden then. * When the file browser is opened as regular editor, the header remains visible. * All file browser regions are now defined in Python (the button layout). * Adjusted related operator UI names. Keymap: Keymap is now consistent with other list-based views in Blender, such as the Outliner. * Left click to select, double-click to open * Right-click context menus * Shift-click to fill selection * Ctrl-click to extend selection Operator options: These previously overlapped with the source list, which caused numerous issues with resizing and presenting many settings in a small panel area. It was also generally inconsistent with Blender. * Moved to new sidebar, which can easily be shown or hidden using a prominent Options toggle. * IO operators have new layouts to match this new sidebar, using sub-panels. This will have to be committed separately (Add-on repository). * If operators want to show the options by default, they have the option to do so (see `WM_FILESEL_SHOW_PROPS`, `hide_props_region`), otherwise they are hidden by default. General Layout: The layout has been changed to be simpler, more standard, and fits better in with Blender 2.8. * More conventional layout (file path at top, file name at the bottom, execute/cancel buttons in bottom right). * Use of popovers to group controls, and allow for more descriptive naming. * Search box is always live now, just like Outliner. Views: * Date Modified column combines both date and time, also uses user friendly strings for recent dates (i.e. "Yesterday", "Today"). * Details columns (file size, modification date/time) are now toggleable for all display types, they are not hardcoded per display type. * File sizes now show as B, KB, MB, ... rather than B, KiB, MiB, … They are now also calculated using base 10 of course. * Option to sort in inverse order. Vertical List View: * This view now used a much simpler single vertical list with columns for information. * Users can click on the headers of these columns to order by that category, and click again to reverse the ordering. Icons: * Updated icons by Jendrzych, with better centering. * Files and folders have new icons in Icon view. * Both files and folders have reworked superimposed icons that show users the file/folder type. * 3D file documents correctly use the 3d file icon, which was unused previously. * Workspaces now show their icon on Link/Append - also when listed in the Outliner. Minor Python-API breakage: * `bpy.types.FileSelectParams.display_type`: `LIST_SHORT` and `LIST_LONG` are replaced by `LIST_VERTICAL` and `LIST_HORIZONTAL`. Removes the feature where directories would automatically be created if they are entered into the file path text button, but don't exist. We were not sure if users use it enough to keep it. We can definitely bring it back. ---- //Combined effort by @billreynish, @harley, @jendrzych, my university colleague Brian Meisenheimer and myself.// Differential Revision: https://developer.blender.org/D5601 Reviewers: Brecht, Bastien
2019-04-17ClangFormat: format '#if 0' code in source/Campbell Barton
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
BF-admins agree to remove header information that isn't useful, to reduce noise. - BEGIN/END license blocks Developers should add non license comments as separate comment blocks. No need for separator text. - Contributors This is often invalid, outdated or misleading especially when splitting files. It's more useful to git-blame to find out who has developed the code. See P901 for script to perform these edits.
2018-02-01Fix: msvc build error with bli_fileops.hRay Molenkamp
bli_fileops.h was using uint64_t without including the proper header. issue triggered by rBb0af44fa4d7a2e134b315c49a4fbdf573f781004
2017-05-27Remove MinGW supportAaron Carlisle
The Issue ======= For a long time now MinGW has been unsupported and unmaintained and at this point, it looks like something that we should just leave behind and move on. Why Remove ========== One of the big motivations for MinGW back in the day is that it was free compared to MSVC which was licensed based. However, now that this is no longer true we have basically stopped updating the need CMake files. Along with the CMake files, there are several patches to the extern libs needed to make this work. For example, see: https://developer.blender.org/diffusion/B/browse/master/extern/carve/patches/mingw_w64.patch If we wanted to keep MinGW then we would need to make more custom patches to the external libs and this is not something our platform maintainers are willing to do. For example, here is the patches needed to build python: https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-python3 Fixes T51301 Differential Revision: https://developer.blender.org/D2648
2015-12-21BLI_storage: Split text/binary version of mem-from-file funcsCampbell Barton
Fix T47022, caused by own commit de0119d08
2015-12-14BLI_storage: util function BLI_file_read_as_memCampbell Barton
Use for text loading and pasting from file.
2015-10-08BLI_path api, minor changes to CWD handlingCampbell Barton
- BLI_current_working_dir's return value must be checked, since it may fail. - BLI_current_working_dir now behaves like getcwd, where a too-small target will return failure. - avoid buffer overrun with BLI_path_cwd, by taking a maxlen arg.
2015-08-24BLI_fileops: Some fixes and cleanup.Bastien Montagne
* Fix BLI_file_touch, used to add one dummy byte ((unsigned char)EOF) to empty files! * Get rid of static global temp string in WIN32 area (very bad, and useless!). * Get rid of paranoid NULL checks in WIN32's BLI_gzopen(). * Add non-relative filename asserts to WIN32 file operations too. * ifdef-out BLI_move and BLI_create_symlink, unused (and the later is not even implemented for windows). Partly based on patch and points raised by Jason Wilkins (jwilkins) in T32870, thanks!
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-07-21Remove nonnull attribute, NULL arg is valid here.Campbell Barton
2015-07-14BLI_fileops: Make BLI_dir_create_recursive() return success/error status.Bastien Montagne
Handy to know directly whether a file creation succeeded or not. Also, made a few more changes in this func, and harmonized a bit win32/*nix versions.
2015-03-28Cleanup: redundant struct declarationsCampbell Barton
2015-02-17Ensure BLI_stat() return value is checked.Campbell Barton
also add function attrs on BLI_fileops to ensure they're used correctly.
2015-01-06cleanup: warningsCampbell Barton
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-03Add some BLI helpers needed by asset branch.Bastien Montagne
`BLI_strncpy_ensure_pad()` is also useful with current master code. The two others (`BLI_strcmp_ignore_pad()` and `BLI_filelist_duplicate()`) are only used in asset branch currently, but think they could be useful in other places too, and simplifies handling of asset branch & future patch review. Reviewers: campbellbarton Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D965
2014-09-04Write Compressed blend files directlyCampbell Barton
Writing compressed files would write the uncompressed blend, then re-compress on-disk. Use a wrapper for open/write/close commands
2014-08-07Cleanup: Remove special code for Visual Studio 2008.Thomas Dinges
Goodbye VC2008, it has been a pleasure (more or less) :D SCons / CMake cleaenup will follow. Differential Revision: https://developer.blender.org/D715
2014-06-23D605: Fixes for proper handling of wchar_t paths in MinGW.Tamito Kajiyama
* Fixed different not-in-sync #ifdef blocks for struct stat variants under Windows. Comments have been left to indicate the portions of BLI_fileops.h and BLI_fileops_types.h that need to stay in sync. * Added BLI_wstat() to de-duplicate #ifdef blocks for stat() variants on Windows. * Fix for opendir() and associate functions in MinGW not working properly with non-ASCII, MBCS-compatible paths. MinGW (FREE_WINDOWS) has opendir() and _wopendir(), and only the latter accepts a path name of wchar_t type. Rather than messing up with extra #ifdef's here and there, Blender's own implementations of opendir() and related functions are used to properly support paths with non-ASCII, MBCS-compatible characters. Tested with MSVC 2013 Express, MinGW32 (gcc 4.6.2) and MinGW-w64 (gcc 4.7.1). Differential Revision: https://developer.blender.org/D605 Reviewed By: campbellbarton
2014-05-28Fix T40157: Loading movies larger than 4GB in size failsSergey Sharybin
Issue was caused by _wstat returning EOVERFLOW error because of file size didn't fit into stat structure which was using long datatype. The idea of this patch is to use _wstat64 and _stat64 structure which is capable storing 64bit file sizes. Made it a typedef for stat structure used by BLI_stat function in order to make code easier to follow and avoid ifdefs all over the place. Additionally solved issue with BLI_exists which was wrongly returning False in cases destination file is larger then 4GB.
2014-03-15Code cleanup: use r_ prefix for return argsCampbell Barton
2013-08-20Get rid of PATH_MAX in Ghost System X11Sergey Sharybin
The reason of this is because PATH_MAX is not guaranteed to be defined on all platforms and Hurd doesn't define it. So either we need to support arbitrary long file path or we need to define own maximum path length. The rule here would be: - If it's not big trouble to support arbitrary long paths (i.e. in ghost by using std::string instead of char*) then arbitrary long path shall be implemented. - For other cases to use PATH_MAX please include BLI_fileops.h which takes care of making sure PATH_MAX is defined. Additional change: get rid of own changes made yesterday which were supposed to make storage.c work fine in cases PATH_MAX is not define, but on the second though it lead to unneeded complication of the code. Thanks Campbell for review!
2013-03-26style cleanup:Campbell Barton
also rename mesh_getVertexCos() --> BKE_mesh_vertexCos_get() to match curve function.
2013-03-13Fix #34551: blender crash rendering with save buffers.Brecht Van Lommel
Problem was the new usage of access() on Windows, this doesn't accept X_OK. Also wrapped _waccess so that UTF-8 paths work.
2013-03-13Fix for build error with previous commit, seems the order of #includes ↵Brecht Van Lommel
matters here.
2013-03-13Fix #34626: voxel data texture can't read > 2GB files on Windows.Brecht Van Lommel
Also fixed BLI_fopen not being used for AVI movie files, which meant AVI read could fail reading a file from a path with special characters on Windows.
2013-03-05patch [#34103] fileops_1.patchCampbell Barton
from Lawrence D'Oliveiro (ldo) Add comments and use of bool type in fileops.c
2013-03-05patch [#34103] dir_contents.patchCampbell Barton
from Lawrence D'Oliveiro (ldo) - storage.c: Simplify BLI_dir_contents and make it and its internal subsidiary routines reentrant - Moved common code for disposal of a struct direntry to new routine BLI_free_filelist in storage.c, and put calls to it in interface_icons.c and filelist.c - Took out inclusion of BLI_fileops_types.h from BLI_fileops.h and put it explicitly into .c files that need it (which turned out to be only 7 of the 35 files that were including the former)
2013-03-05patch [#34103]Campbell Barton
from Lawrence D'Oliveiro (ldo) More use of bool type, necessitating adding inclusion of BLI_utildefines.h, or moving it up in the inclusion order if it was already included, in various places - storage.c: make some variables only used in bli_builddir local to that - storage.c: BLI_file_descriptor_size should allow 0 as a valid file descriptor - path_util.c: make pointers to non-reentrant storage returned from folder routines const, necessitating making variables holding these returned pointers const elsewhere as well - path_util.c: BLI_string_to_utf8 closes iconv context in case of conversion error - blf_lang.c: fill_locales routine now has its own "languages" local variable to construct paths (was stealing internal storage belonging to BLI_get_folder before)