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
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-04-08Cleanup: rename to BLI_path_cwd to BLI_path_abs_from_cwdCampbell Barton
This is now more clearly a function that makes the path absolute using the current working directory.
2020-04-08Cleanup: missed renaming BLI_cleanup_unc_16 in recent refactorCampbell Barton
Missed from d14e76806921f
2020-04-07Cleanup: BLI_path.h function renamingCampbell Barton
Use BLI_path_ prefix, more consistent names: BLI_parent_dir -> BLI_path_parent_dir BLI_parent_dir_until_exists -> BLI_path_parent_dir_until_exists BLI_ensure_filename -> BLI_path_filename_ensure BLI_first_slash -> BLI_path_slash_find BLI_last_slash -> BLI_path_slash_rfind BLI_add_slash -> BLI_path_slash_ensure BLI_del_slash -> BLI_path_slash_rstrip BLI_path_native_slash -> BLI_path_slash_native Rename 'cleanup' to 'normalize', similar to Python's `os.path.normpath`. BLI_cleanup_path -> BLI_path_normalize BLI_cleanup_dir -> BLI_path_normalize_dir BLI_cleanup_unc -> BLI_path_normalize_unc BLI_cleanup_unc16 -> BLI_path_normalize_unc16 Clarify naming for extracting, creating numbered paths: BLI_stringenc -> BLI_path_sequence_encode BLI_stringdec -> BLI_path_sequence_decode Part of T74506 proposal.
2020-03-06Cleanup: Fix forward declaration of headersDalai Felinto
2020-03-06Cleanup: remove BLI_cleanup_fileCampbell Barton
In practice, references to files rarely have trailing slashes (by accident). Remove this function in favor of BLI_cleanup_path.
2020-02-15Cleanup: make BLI_make_exist local to the file selectorCampbell Barton
This isn't a general utility, and the name wasn't descriptive.
2019-12-25Cleanup: Remove BLI_stringenc_pathLukas Stockner
2019-12-18Image Editor: Load UDIMs even if secondary tile is selectedLukas Stockner
Previously the user had to select the 1001 tile for this to work, now any tile will work as long as the 1001 tile still exists on disk.
2019-08-25Cleanup: redundant struct declarationsCampbell Barton
2019-08-14Text editor: syntax highlighting + line numbers on by defaultSybren A. Stüvel
The most common use of the text editor seems to be for scripting. Having line numbers and syntax highlighting enabled by default seems sensible. Syntax highlighting is now enabled by default, but is automatically disabled when the datablock has a non-highlighted extension. Highlighting is enabled for filenames like: - Text - Text.001 - somefile.py and is automatically disabled when the datablock has an extension for which Blender has no syntax highlighter registered. Reviewers: billreynish, campbellbarton Subscribers: brecht, billreynish Differential Revision: https://developer.blender.org/D5472
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-03-20Fix BLI_path_frame_stripSybren A. Stüvel
The `BLI_path_frame_strip` function was completely broken, unless the number of digits in the sequence number was the same as the length of the extension. In other words, it would work fine for `file.0001.abc` (4 digit `0001` and 4 char `.abc`), but other combinations would truncate to the shortest (`file.001.abc` would become `file.###.ab` and `file.00001.a` would become `file.##.a`). The dependency between the sequence number and the file extension is now removed. The behaviour has changed a little bit in the case where there are no numbers in the filename. Previously, `path="filename.abc"` would result in `path="filename.abc"` and `ext=""`, but now it results in `path="filename"` and `ext=".abc"`. This way `ext` always contains the extension, and the behaviour is consistent regardless of whether there were any numbers found. Furthermore, I've removed the `bool set_frame_char` parameter, because it was unclear, probably also buggy, and most importantly, never used. I've also added a unit test for the `BLI_path_frame_strip` function.
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-09-18Application Templates: make templates more prominent in the UI.Brecht Van Lommel
The goal here is to make app templates usable for default templates that we can ship with Blender. These only have a custom startup.blend currently and so are quite limited compared to app templates that fully customize Blender. But still it seems like the same kind of concept where we should be sharing the code and UI. It is useful to be able to save a startup.blend per template, and I can imagine some scripting being useful in the future as well. Changes made: * File > New and Ctrl+N now list the templates, replacing a separate Application Templates menu that was not as easy to discover. * File menu now shows name of active template above Save Startup File and Load Factory Settings to indicate these are saved/loaded per template. * The "Default" template was renamed to "General". * Workspaces can now be added from any of the template startup.blend files when clicking the (+) button in the topbar. * User preferences are now fully shared between app templates, unless the template includes a custom userpref.blend. I think this will be useful in general, not all app templates need their own keymaps for example. * Previously Save User Preferences would save the current app template and then Blender would start using that template by default. I've disabled this, to me it seems it was unintentional, or at least not clear at all that saving user preferences also makes the current Differential Revision: https://developer.blender.org/D3690
2018-09-05Fix T54152: --env-system-scripts fails on win32Ray Molenkamp
2018-06-18Fix T55503: File browser filter not working correctly.Bastien Montagne
There were two issues here, introduced by rB66aa4af836: * Forgot to change length of some filter_glob var deep in filebrowser code. * Truncating filter_glob in general can be dangerous, generating unexpected patterns. Last point was the root of the issue here, truncating to 63 chars string left last group as 'match everything' `*` pattern. To fix that to some extent, added a new BLI_path_extension_glob_validate helper to BLI_path_util, which ensures we do not have last wildcards-only group in our pattern, when there are more than one group.
2018-06-17Cleanup: remove unused BLI_rebase_pathCampbell Barton
2018-06-17Cleanup: BLI path extension APICampbell Barton
Use BLI_path_extension_* prefix.
2017-04-17BLI: make BLI_make_existing_file() return true on success, and false on ↵Bastien Montagne
failure...
2017-03-24BLI_path_util: Add BLI_path_joinCampbell Barton
There weren't any convenient ways to join multiple paths in C that accounted for corner cases.
2017-03-23BLI_path_util: Add string versions of SEP, ALTSEPCampbell Barton
This allows for adding separators in string literals.
2017-03-22Cleanup: remove BLI_getlastdirCampbell Barton
Replace with BLI_path_name_at_index
2017-03-22BLI_path_util: add BLI_path_name_at_indexCampbell Barton
Utility to get a file/dir in the path by index, supporting negative indices to start from the end of the path. Without this it wasn't straightforward to get the a files parent directory name from a filepath.
2017-01-16Cleanup/refactor: Add new BLI_string_util.Bastien Montagne
Things like `BLI_uniquename` had nothing, but really nothing to do in BLI_path_util files! Also, got rid of length limitation in `BLI_uniquename_cb`, we can use alloca here to avoid overhead of malloc while keeping free size (within reasonable limits of course).
2017-01-16Cleanup: remove unused & unimplemented `BLI_newname`.Bastien Montagne
2015-10-17Cleanup: BLI_path commentsCampbell Barton
2015-10-17Cleanup: remove unused BLI_string_to_utf8Campbell Barton
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-07-14BLI_path_utils: fix/enhance BLI_filename_make_safe(), add BLI_path_make_safe().Bastien Montagne
BLI_filename_make_safe had several issues: * Would replace all dots ('.'), not a great idea since it would break extensions. * Was not checking for 'control' ASCII chars (though unlikely, better to be safe here). * Win32 only: was not checking for forbidden names (con, aux, ltp0, com0, etc.). New BLI_path_make_safe() simply checks each path's item with BLI_filename_make_safe().
2015-06-30Cleanup: move BLI_char_switch into BLI_stringCampbell Barton
2015-06-04New "use placeholders" feature of the sequencer did not detect correctAntony Riakiotakis
filenames. Added BLI_path utility functions to decompose a path name and extract the frame number. It should be useful in autocollapse feature as well
2015-05-05Prefer name 'program' over 'binary'Campbell Barton
binary-search is confusing!
2015-05-05BLI_path: add PATH search utility functionsCampbell Barton
2015-03-28Cleanup: redundant struct declarationsCampbell Barton
2015-02-13Make modifier_unique_name return whether modifier was renamed or notSergey Sharybin
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-16Fix T43275: Crash on Render when using 'save buffer' and render layer name ↵Bastien Montagne
contains a '/' Added a new BLI_path_utils func, `BLI_filename_make_safe()`, which for now simply replaces unsafe chars for paths (like '\' or '/') by an underscore...
2014-11-23Refactor: BLI_path_util (split out app directory access)Campbell Barton
This module is intended for path manipulation functions but had utility functions added to access various directories.
2014-07-30BLI_path_utils: rename BLI_clean -> BLI_path_native_slashCampbell Barton
2014-06-23T39690: Modifications to Blender's 'temp dir' system.Bastien Montagne
Current temporary data of Blender suffers one major issue - default 'temp' dir on Windows is never automatically cleaned up, and can end being quite big when used by Blender, especially when we have to store per-process data (using getpid() in file names). To address this, this patch: * Divides tempdir paths in two, one for 'base' temp dir (the same as previous unique tempdir path), the other is a mkdtemp-generated sub-dir, specific to each Blender instance. * Only uses base tempdir when we need some shallow persistance accross Blender sessions - and we always reuse the same filename (quit.blend...) or generate small file (crash reports...). * Uses temp sub-dir for heavy files like pointcache or renderEXRs (Save Buffer option). * Erases temp sub-dir on quit or crash. To get this working it also adds a working 'recursive delete' to BLI_delete() under Windows. Note that, as in current code, the 'recover render result' hack-feature that was possible with SaveBuffer option is still removed. A real renderresult cache feature will be added soon, though. Reviewers: campbellbarton, brecht, sergey Reviewed By: campbellbarton, sergey CC: sergey Differential Revision: https://developer.blender.org/D531
2014-05-18Comment unused BLI_rebase_pathCampbell Barton
2014-05-03BLI_path_suffix() - new path util functon to add a suffix to a filepath ↵Dalai Felinto
(before the extension) Revision: D465 Reviewd by Campbell Barton
2014-04-21Basic support for UNC paths on WindowsAndrea Weikert
Differential Revision: https://developer.blender.org/D298 Allows users on Windows to enter UNC paths in the filebrowser and to link to .blend files on a UNC path. Functionality is limited still, we can't browse the network yet and have no support to check user rights so far. What works: - enter an UNC path in the file browser manually or via copy/paste - navigation within the UNC share subfolders - link to a file on a UNC share What does not (yet) work: - browse the network for computers and shares - browse to a folder that requires entering user credentials Contributors: Rob McKay - original patch Campbell Barton - style fixes Reviewers: Campbell Barton, Brecht van Lommel
2014-01-31Code cleanup: comments and warningsCampbell Barton
2014-01-30Code cleanup: remove BLI_has_parentCampbell Barton
2014-01-30Code cleanup: add BLI_testextensie_n, replacing multuple calls to ↵Campbell Barton
BLI_testextensie also use attributes for BLI path functions
2013-11-25Fix T37591: 'Extensions' option ignored for movies.Campbell Barton