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
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2022-02-09Cleanup: make file headers more consistentCampbell Barton
Also some descriptive text into doc-strings.
2021-12-08Cleanup: move public doc-strings into headers for 'blenloader'Campbell Barton
Ref T92709
2021-08-21Refactor low-level blendfile reading into separate filesLukas Stockner
Instead of handling mmap, compression etc. all directly in readfile.c, refactor the code to use a generic FileReader. This makes it easier to add new compression methods or similar, and allows to reuse the logic in other places (e.g. thumbnail reading). Reviewed By: campbellbarton, brecht, mont29 Differential Revision: https://developer.blender.org/D5799
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2020-09-21Cleanup: balance braces, spellingCampbell Barton
Keep braces balanced where possible, even with ifdef's as it avoids confusions with editors calculating correct indentation level & finding matching brackets.
2020-09-20Fix broken Windows buiilds after own recent commit in read/write code.Bastien Montagne
Usual issue of win32 not following POSIX standards.
2020-09-20Sanitize type 'size' parameters in our read/write file codeBastien Montagne
This patch tries to sanitize the types of our size parameters across our read and write code, which is currently fairly inconsistent (using `int`, `uint`, `size_t`...), by using `size_t` everywhere. Since in Blender file themselves we can only store chunk of size `MAX_INT`, added some asserts to ensure that as well. See {T79561} for details. Differential Revision: https://developer.blender.org/D8672
2020-09-04Cleanup: Clang-Tidy readability-inconsistent-declaration-parameter-name fixSebastian Parborg
No functional changes
2020-06-05Fix T77396: crash in memfile undo code after recent optimizations.Bastien Montagne
Optimizations in rBcda15408582e8de5b405 do not guarantee anymore that consecutive memchunks in two consecutive undo steps are actually about the same data (and hence can share the same buffer when unchanged). This buffer sharing can now happen without any particular order, so we need to change the process when 'merging' two undo memfiles together. Note that existing code was not logically correct either, even with previous undo storage code, since it would blindly transfer ownership of the buffer to the second memchunk, without checking whether the first one was actually the owner of it or not (a same buffer can be shared by matching memchunks in many consecutive memfiles/undo steps).
2020-06-03Undo: Detect/find proper memchunk for a given ID during undo step writing.Bastien Montagne
Most of the time current (based on order) system works fine, but when you add or rename (i.e. re-sort) some ID, every data/memchunk afterwards would be out of sync and hence re-stored in memory (and reported as changed). Now we are storing the ID's session_uuid in the memchunks, which allows to actually always find the first memchunk for an already existing ID stored in previous undo steps, and compare the right memory. Note that current, based-on-order system is still used almost all of the time, search in the new ghash is only performed for a few data-blocks (when needed at all). Reviewed By: brecht Maniphest Tasks: T60695 Differential Revision: https://developer.blender.org/D7877
2020-04-07Undo: change depsgraph recalc flags handling to improve performanceBrecht Van Lommel
These changes only have an effect when the experimental Undo Speedup preference is enabled. * For DEG_id_tag_update, accumulate recalc flags immediately before the undo push happens instead of afterwards. Otherwise the undo state does not contain enough flags, and the current state may contain too many flags. This also means we call DEG_id_tag_update after undo with the accumulated flags to ensure they are flushed to other datablocks. * For undo, accumulate recalc flags in id->recalc and clear accumulated flags immediately. Not clearing would cause circular behavior where accumulated flags may never end up being cleared. This matches what happens after an undo push where these are also cleared, indicating that the undo state and current in-memory state match exactly. * Don't change id->recalc of identical datablocks, it should not be needed. There is one exception for armatures where pointers across datablocks exist which otherwise would cause problems. There may be a better solution to this but it seems to work in agent 327 production files. * This contains a change in undofile.c to avoid detecting all datablocks as changed for the first of the two undo steps, where we restore to the state of the last undo push before going to the one before. Without this the whole system is much less efficient. However this is unsafe in the sense that if an app handler or operators edits a datablock after an undo push, that change will not be undone. It can be argued that this is acceptable behavior, since a following undo push will include that change and this may already have unexpected side effects. Ref T60695 Differential Revision: https://developer.blender.org/D7339
2020-04-03Code Quality: Replace for loops with LISTBASE_FOREACHDalai Felinto
Note this only changes cases where the variable was declared inside the for loop. To handle it outside as well is a different challenge. Differential Revision: https://developer.blender.org/D7320
2020-03-30Fix undo misdetecting identical future chunk in some casesBrecht Van Lommel
Clear is_identical_future before adding a next undo step, to avoid wrong values for cases where we undo and then add a step with different changes than what was previously the next step. Ref D7274
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-17Add experimental global undo speedup.Bastien Montagne
The feature is hidden behind an experimental option, you'll have to enable it in the preferences to try it. This feature is not yet considered fully stable, crashes may happen, as well as .blend file corruptions (very unlikely, but still possible). In a nutshell, the ideas behind this code are to: * Detect unchanged IDs across an undo step. * Reuse as much as possible existing IDs memory, even when its content did change. * Re-use existing depsgraphs instead of building new ones from scratch. * Store accumulated recalc flags, to avoid needless re-compute of things that did not change, when the ID itself is detected as modified. See T60695 and D6580 for more technical details.
2019-04-22Cleanup: style, use braces for blenloaderCampbell Barton
2019-04-21Cleanup: comments (long lines) in blenloaderCampbell 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.
2019-01-26Cleanup: remove redundant BKE/BLI/BIF headersCampbell Barton
2018-11-30Cleanup: styleCampbell Barton
2018-11-22Merge branch 'master' into blender2.8Campbell Barton
2018-11-22Fix T57989: File loaded as startupCampbell Barton
The file contents was used to check if the file was a startup file. Now pass in an argument from startup loading code instead.
2018-11-07Cleanup: Remove 'BKE_library.h' include from 'BKE_main.h'Bastien Montagne
That kind of implicit includes should really only be done when totally, absolutely necessary, and ideally only with rather simple 'second-level' headers. Otherwise not being explicit with includes always end up biting in unexpected ways...
2018-06-17Cleanup: trailing space for blenloaderCampbell Barton
2018-06-05Cleanup: use new accessors to blendfile path (Main.name).Bastien Montagne
2018-04-14Undo: refactor memfile writingCampbell Barton
- Move static undo variable into 'WriteData', 'memfile_chunk_add' used arguments in a confusing way, sometimes to set/clear static var. - Replace checks for 'wd->current' with 'wd->use_memfile' move memfile vars into 'wd->mem' struct.
2018-04-01Resolve unsigned comparison error w/ MSVCCampbell Barton
2018-03-31Undo: unified undo system w/ linear historyCampbell Barton
- Use a single undo history for all operations. - UndoType's are registered and poll the context to check if they should be used when performing an undo push. - Mode switching is used to ensure the state is correct before undo data is restored. - Some undo types accumulate changes (image & text editing) others store the state multiple times (with de-duplication). This is supported by checking UndoStack.mode `ACCUMULATE` / `STORE`. - Each undo step stores ID datablocks they use with utilities to help manage restoring correct ID's. Needed since global undo is now mixed with other modes undo. - Currently performs each undo step when going up/down history Previously this wasn't done, making history fail in some cases. This can be optimized to skip some combinations of undo steps. grease-pencil is an exception which has not been updated since it integrates undo into the draw-session. See D3113
2018-03-27Cleanup: global undo (minor changes to internals)Campbell Barton
- Get memory usage from MemFile instead of MEM API avoids possible invalid when threads alloc memory. - Use size_t instead of uint and uintptr_t to store size. - Rename UndoElem.str -> filename - Rename MemFileChunk.ident -> is_identical
2016-07-08Undo: use system memcmpCampbell Barton
`my_memcmp` didn't work properly comparing memory sizes not aligned to 4 bytes, this worked while we used guarded-alloc (which always wrote a guard at the end of each allocation). Since moving to lockfree allocator it could read uninitialized memory. It also consistently performed ~10-30% worse then glibc's. This is typically well optimized, no need to do ourselves.
2015-04-18Cleanup: use BLO_memfile prefixCampbell Barton
2014-11-29Cleanup: unused headersCampbell Barton
2013-08-27ghash/bli-listbase edits, rename BLI_ghash_pop -> BLI_ghash_popkey (since it ↵Campbell Barton
takes a key as an arg and isnt popping any element from the hash as you might expect). add BLI_pophead/tail, since getting the first element from a list and removing it is a common task.
2013-04-05code cleanup: include orderCampbell Barton
2012-08-04style cleanupCampbell Barton
2012-05-12style cleanup: whitespace, bli & makesdnaCampbell Barton
2012-04-17code cleanup: use const args for writing files.Campbell Barton
2012-03-24style cleanup: follow style guide for formatting of if/for/while loops, and ↵Campbell Barton
else if's
2011-10-23remove $Id: tags after discussion on the mailign list: ↵Campbell Barton
http://markmail.org/message/fp7ozcywxum3ar7n
2011-02-27doxygen: blender/blenloader tagged.Nathan Letwory
2011-02-23doxygen: prevent GPL license block from being parsed as doxygen comment.Nathan Letwory
2010-08-08remove unused includesCampbell Barton
2010-04-18remove config.h references, was added for automake build system rev around ↵Campbell Barton
124-126 but isnt used by any build systems now.
2010-03-21Fix syntax for ID keyword.Guillermo S. Romero
2010-02-12correct fsf addressCampbell Barton
2010-01-26am learning bad spelling from blender. grrCampbell Barton