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-01-07Cleanup: remove redundant const qualifiers for POD typesCampbell Barton
MSVC used to warn about const mismatch for arguments passed by value. Remove these as newer versions of MSVC no longer show this warning.
2021-12-08Cleanup: move public doc-strings into headers for 'makesdna'Campbell Barton
Ref T92709
2021-06-28Cleanup: repeated terms in code comments & error messagesCampbell Barton
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-04-13DNA: support int8_t type in DNA structsJacques Lucke
Differential Revision: https://developer.blender.org/D8908
2020-10-08DNA: cleanup endian switching when loading fileJacques Lucke
This patch "modernizes" `DNA_struct_switch_endian` similar to how I updated `DNA_struct_reconstruct` recently. Furthermore, some special case handling have been moved to another place. Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D9089
2020-10-01Cleanup: Clang tidy fixesHans Goudey
Fix a redundant return statement at the end of void function and an inconsistent declaration parameter names.
2020-09-29DNA: optimize struct reconstruction by doing some preprocessingJacques Lucke
When loading large files that are more than a couple weeks old (such that DNA has changed in that time), a significant amount of time is spent in `DNA_struct_reconstruct`. This function takes a struct in the old layout and creates a struct in the new layout from it. This was slow because it was computing the diff between the struct layouts every time a struct is updated. Now the steps for the struct reconstruction is computed only once per struct. This information is then used to actually reconstruct all structs that changed. I measured about 10-20% speedup when loading Spring files. E.g. `10.6s -> 8.7s` for `06_055_A.anim.blend` in BKE_blendfile_read`. This percentage varies a lot based on the number of blocks that have to be reconstructed and how much DNA has changed since they have been written. In none of my tests was the new code slower than the old code. Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D8959
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-28Cleanup: correct usage of extern-C blocks in various placesJacques Lucke
This removes extern-C blocks around other includes and adds such blocks for some headers that need them.
2019-09-11DNA: make DNA_elem_size_nr a public functionCampbell Barton
Needed for getting struct member offsets.
2019-05-22dna_genfile: add SDNA struct/elem queries that use alias namesCampbell Barton
Allow versioning code to use checks which use run-time naming instead of the old names which are only listed in dna_rename_defs.h. Addresses T64791.
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-02Cleanup: SDNA/DNA namingCampbell Barton
Use 'size' instead of 'len' to represent the size of data in bytes, 'len' is used for the result of 'strlen' or the length of an array in some parts of 'makesdna.c' & 'dna_genfile.c'. Also clarify comments and some variable names, no functional changes.
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-16DNA: support DNA type & name aliasesCampbell Barton
This allows us to rename struct & struct members in the source code without changing the file format. This is useful because the code becomes increasingly confusing when names such as oops, ipo & dupli aren't used anywhere except DNA headers. dna_rename_defs.h is used to define renaming operations. The renaming it's self will be done separately.
2019-02-15Cleanup: sync minor changes from D4342Campbell Barton
Use naming conventions from the patch so they match when it's applied.
2019-02-12makesdna: add shared utility moduleCampbell Barton
Currently only a single function was duplicated which isn't so bad, this change is to allow DNA versioning code to be shared between dna_genfile.c and makesdna.c.
2019-02-12DNA: support versioning structs & struct membersCampbell Barton
This is only to be used rarely because it's not forwards compatible. Replace version patching of old 2.80 DNA with a more generic API.
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-15Cleanup: commas at the end of enumsCampbell Barton
Without this clang-format may wrap them onto a single line.
2019-01-15Cleanup: comment line length (DNA)Campbell Barton
Prevents clang-format wrapping text before comments.
2019-01-07Cleanup: move DNA comments before struct membersCampbell Barton
Needed for clang-format in some cases, see: T53211
2016-08-13Add DNA_struct_find (useful for version patching)Julian Eisel
2016-07-21Cleanup: use const, move comments to enumCampbell Barton
2016-07-14Cleanup: styleCampbell Barton
2016-07-12writefile: reuse SDNA between writesCampbell Barton
Avoids decoding the SDNA string every undo step.
2016-07-12readfile: report SDNA decoding errors on file readCampbell Barton
This was printed to the stdout, however the error case wasn't checked or well supported. Also, errors decoding SDNA would sometimes call exit(1).
2016-07-12writefile: remove SDNA last-hit, optimize DNA reconstructCampbell Barton
- Move last-hit index out of SDNA struct (allows for access by multiple threads). - Replace O(n^2) search with hash lookup in DNA reconstruction.
2016-07-06writefile: avoid adding SDNA to every undo stepCampbell Barton
Since SDNA was allocated for each undo step, the new address meant it was considered different and included again. Add an option not to duplicate the DNA string when calling DNA_sdna_from_data, as well as avoiding a redundant copy, it writes the same address each time.
2016-01-16Cleanup: use enum constant for DNA comparisonCampbell Barton
2016-01-15DNA: partial revert of long removalCampbell Barton
924c626 broke loading on systems with different endian. We could support reading values from SDNA, it isn't really worth the extra hassle. Long support is still removed, just keep enum values the same.
2016-01-11DNA: remove 'long' typeCampbell Barton
Turns out even in files this was used, it was only for runtime members that are now ignored.
2016-01-09DNA: remove endian switching long checksCampbell Barton
This wasn't correct, and long was only ever used in cases we can now ignore.
2013-12-15Minor optimization for strlen and memcpy calls for reading blend filesSv. Lockal
Summary: This commit removes ~10000 strlen calls and ~100000 memcpy calls in blender (profiled with blender --background), ~10000 memcpy calls in makesdna. There is no need to create null-terminated strings for atoi, because it converts only the initial portion of the string anyway. Also it was noticed that DNA_elem_array_size and arraysize functions work only with full strings, so there is no point to calculate strlen. Reviewers: campbellbarton Reviewed By: campbellbarton Differential Revision: http://developer.blender.org/D105
2013-03-17New feature:Ton Roosendaal
Automatic switching for drawing pixel buffers via glDrawPixels or using GPU textures It works with a User Preference limit, in megapixels, to define whether to use GPU or direct pixel drawing. Default is now initialized to 10 MP (4k buffers). Especially for zooming out (draw smaller) texture drawing is much smaller. Also Nvidia cards typically draw much faster with textures in general. Added to node backdrop first now, the other editors follow in a next commit. For coders: added new DNA function to initialize new struct variables, so you don't have to sub-version files anymore. DNA_struct_elem_find(fd->filesdna, "structname", "typename", "varname") "filesdna" is the sdna description of the current file being versioned.
2013-02-22patch [#34103] Add explanatory comments to dna_genfile.[ch]Campbell Barton
from Lawrence D'Oliveiro (ldo)
2012-10-22style cleanupCampbell Barton
2012-04-07code cleanup: no functional changesCampbell Barton
- memset(..., -1) is used incorrectly even though it worked: MOD_solidify.c - thanks Halley from IRC for noticing this. use fill_vn_i() instead. - quiet warnings in editmesh_slide.c - cleanup comments in bmesh and some other minor comment additions.
2012-02-17unify include guard defines, __$FILENAME__Campbell Barton
without the underscores these clogged up the namespace for autocompleation which was annoying.
2012-02-08fix [#30090] Cloth modifier related crash when loading old fileCampbell Barton
own fault when adding int64 support. `void` type was being used to workaround a different bug in the ClothSimSettings struct.
2011-12-30minor dna header cleanupCampbell Barton
2011-12-24change customdata mask from an 'unsigned int' to an 'u_int64_t', since BMesh ↵Campbell Barton
branch has run out of bits
2011-12-23add DNA support for int64_t. nothing uses this currently.Campbell Barton
2011-12-23DNA genfile - de-duplicate some checks and replace magic type numbers with ↵Campbell Barton
an enum
2011-10-23remove $Id: tags after discussion on the mailign list: ↵Campbell Barton
http://markmail.org/message/fp7ozcywxum3ar7n
2011-02-17DNA header files are now grouped under the same module. No further ↵Nathan Letwory
documentation done.
2010-12-03Enabled GCC -Wwrite-strings warning for CMake and replaced many 'char's for ↵Campbell Barton
'const char's,. Only one functional change where Transform orientations passed "" to BIF_createTransformOrientation() which could then have the value written into.