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-10-17Cleanup: Move versioning_defaults.c to C++Hans Goudey
2022-09-19Cleanup: Move versioning_300.c to C++Hans Goudey
2022-09-17Fix: lite build on windowsRay Molenkamp
writefile.cc includes BLI_winstuff.h which includes Windows.h which supplies definitions of min/max that conflict with the c++ headers previously windows.h was only included when TBB was enabled, the inclusion of BLI_winstuff.h now makes this define mandatory for all configurations
2022-09-15BLO: move blenloader to C++Jacques Lucke
Differential Revision: https://developer.blender.org/D15965
2022-09-14Fix: Mesh SoA format conversion skips versioningHans Goudey
Converting to the SoA format (T95965) immediately when reading meshes means that none of the changes from versioning would be applied first. This means important fixes like f14995aba70a aren't properly applied, so modifications could be done to invalid CustomData. To fix this, move the SoA changes into versioning code, in a new versioning_400.cc file. Differential Revision: https://developer.blender.org/D15919
2022-07-30Sculpt: Opaque vertex type for sculptJoseph Eagar
This is a port of sculpt-dev's `SculptVertRef` refactor (note that `SculptVertRef was renamed to PBVHVertRef`) to master. `PBVHVertRef` is a structure that abstracts the concept of a vertex in the sculpt code; it's simply an `intptr_t` wrapped in a struct. For `PBVH_FACES` and `PBVH_GRIDS` this struct stores a vertex index, but for `BMesh` it stores a direct pointer to a BMVert. The intptr_t is wrapped in a struct to prevent the accidental usage of it as an index. There are many reasons to do this: * Right now `BMesh` verts are not logical sculpt verts; to use the sculpt API they must first be converted to indices. This requires a lot of indirect lookups into tables, leading to performance loss. It has also led to greater code complexity and duplication. * Having an abstract vertex type makes it feasible to have one unified temporary attribute API for all three PBVH modes, which in turn made it rather trivial to port sculpt brushes to DynTopo in sculpt-dev (e.g. the layer brush, draw sharp, the smooth brushes, the paint brushes, etc). This attribute API will be in a future patch. * We need to do this anyway for the eventual move to C++. Differential Revision: https://developer.blender.org/D14272 Reviewed By: Brecht Van Lommel Ref D14272
2022-03-14Auto-generate RNA-structs declarations in `RNA_prototypes.h`Julian Eisel
So far it was needed to declare a new RNA struct to `RNA_access.h` manually. Since 9b298cf3dbec we generate a `RNA_prototypes.h` for RNA property declarations. Now this also includes the RNA struct declarations, so they don't have to be added manually anymore. Differential Revision: https://developer.blender.org/D13862 Reviewed by: brecht, campbellbarton
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-30Cleanup: Cmake: remove unnecessary definitions for internationalizationAaron Carlisle
Previously, macros were ifdefed using the cmake option `WITH_INTERNATIONAL` However, the is unnecessary as withen the functions themselves have checks for building without internationalization. This also means that many `add_definitions(-DWITH_INTERNATIONAL)` are also unnecessary. Reviewed By: mont29, LazyDodo Differential Revision: https://developer.blender.org/D13929
2022-01-03Add a new C++ version of an exporter for the Wavefront .obj format.Howard Trickey
This was originally written by Ankit Meel as a GSoC 2020 project. Howard Trickey added some tests and made some corrections/modifications. See D13046 for more details. This commit inserts a new menu item into the export menu called "Wavefront OBJ (.obj) - New". For now the old Python exporter remains in the menu, along with the Python importer, but we plan to remove it soon (leaving the old addon bundled with Blender but not enabled by default).
2021-12-02Blenloader: move ghost include path from INC to TEST_INCSybren A. Stüvel
The Ghost dependency was added to avoid a memory leak (rBc7a1e115b507), but since that's only for the unit tests, it's better to add the path to `TEST_INC`.
2021-11-16Tests: fix memory leak of GHOST system pathsSybren A. Stüvel
Dispose of GHOST system paths when tearing down `BlendfileLoadingBaseTest` and some other test cases. This prevents a memory leak. A better solution would be to rework Blender's initialisation & teardown structure, but that's outside the scope of this fix. No functional changes to Blender.
2021-08-21Add support for Zstandard compression for .blend filesLukas Stockner
Compressing blendfiles can help save a lot of disk space, but the slowdown while loading and saving is a major annoyance. Currently Blender uses Zlib (aka gzip aka Deflate) for compression, but there are now several more modern algorithms that outperform it in every way. In this patch, I decided for Zstandard aka Zstd for several reasons: - It is widely supported, both in other programs and libraries as well as in general-purpose compression utilities on Unix - It is extremely flexible - spanning several orders of magnitude of compression speeds depending on the level setting. - It is pretty much on the Pareto frontier for all of its configurations (meaning that no other algorithm is both faster and more efficient). One downside of course is that older versions of Blender will not be able to read these files, but one can always just re-save them without compression or decompress the file manually with an external tool. The implementation here saves additional metadata into the compressed file in order to allow for efficient seeking when loading. This is standard-compliant and will be ignored by other tools that support Zstd. If the metadata is not present (e.g. because you manually compressed a .blend file with another tool), Blender will fall back to sequential reading. Saving is multithreaded to improve performance. Loading is currently not multithreaded since it's not easy to predict the access patterns of the loading code when seeking is supported. In the future, we might want to look into making this more predictable or disabling seeking for the main .blend file, which would then allow for multiple background threads that decompress data ahead of time. The compression level was chosen to get sizes comparable to previous versions at much higher speeds. In the future, this could be exposed as an option. Reviewed By: campbellbarton, brecht, mont29 Differential Revision: https://developer.blender.org/D5799
2021-07-08CMake: add missing headers, sort file listsCampbell Barton
2021-06-15Cleanup: Add files for version independent versioning helpersJulian Eisel
Adds `source/blender/blendloader/intern/versioning_common.cc` and `versioning_common.h` for version independent versioning functions. I only placed `do_versions_add_region_if_not_found()` in there for now. `blo_do_version_old_trackto_to_constraints()` could also be added, but that's so old, I prefer keeping that in `versioning_legacy.c`.
2021-04-20Core: Add do_versions file for 3.0Falk David
Differential Revision: https://developer.blender.org/D11030
2021-03-18BLO: Functions for temporarily loading a single datablockSybren A. Stüvel
This introduces two functions to the blenloader module, here shown as calls for brevity: * `temp_lib_ctx = BLO_library_temp_load_id(real_main, blend_file_path, idcode, idname, reports);` * Now the data in `temp_lib_ctx->temp_id` can be used (but ought not to be not assigned to non-temp datablocks). * `BLO_library_temp_free(temp_lib_ctx);` The first loads a datablock from a blend file, and returns it as part of a `struct TempLibraryContext`. This struct contains the temp-loaded ID, as well as enough information to correctly free everything again. Differential Revision: https://developer.blender.org/D10736
2020-11-06Cleanup: Render Module: move header files to main directoryAaron Carlisle
Move headers files from `render/extern/` to `render/` Part of T73586
2020-11-06Cleanup: sort structs, filesCampbell Barton
2020-10-05Initialize CLOG to fix crashing unit testsSybren A. Stüvel
Initialize CLOG in the blendfile-loading unit test superclass. Since rB8683d4e88f2e CLOG is used by more areas in Blender, and without initialisation it crashes.
2020-10-05Move sequencer sources from blenkernelRichard Antalik
This is first step of refactoring task T77580. Next step will be breaking up files into smaller ones. Reviewed By: sergey, brecht Differential Revision: https://developer.blender.org/D8492
2020-09-07Cleanup: include missing header files in CMakeCampbell Barton
2020-08-17Cleanup: sort CMake path listsCampbell Barton
2020-08-10Tests: move remaining gtests into their own module foldersBrecht Van Lommel
And make them part of the blender_test runner. The one exception is blenlib performance tests, which we don't want to run by default. They remain in their own executable. Differential Revision: https://developer.blender.org/D8498
2020-07-14Cleanup: sort header, cmake pathsCampbell Barton
2020-06-05Blenloader: New API that will be used for blenloader decentralizationJacques Lucke
Design Task: T76372 This part of a larger refactoring towards a more extensible architecture in Blender: T75724 The API is defined in `BLO_read_write.h`. It adds the small data structures `BlendWriter`, `BlendDataReader`, `BlendLibReader` and `BlendExpander`. Those contain context about the current read/write operation. Furthermore, it adds many functions with the prefixes `BLO_write_*`, `BLO_read_*` and `BLO_expand_*`. Lib linking and expanding will probably be handled by the more generic libquery system eventually. The corresponding parts of the API can be removed then.
2020-04-16UV: support changing the opacity of the UV overlayCampbell Barton
Add this option as it's useful to adjust how much UV's cover the image when UV mapping. D5348 by @EitanSomething with edits
2020-03-06Cleanup: move Alembic, AVI, Collada, and USD to `source/blender/io`Sybren A. Stüvel
This moves the `alembic`, `avi`, `collada`, and `usd` modules into a common `io` directory. This also cleans up some `#include "../../{somedir}/{somefile}.h"` by adding `../../io/{somedir}` to `CMakeLists.txt` and then just using `#include "{somefile}.h"`. No functional changes.
2019-07-31Cleanup: remove BLO_update_defaults_userpref_blendCampbell Barton
Merge into BKE_blendfile_userdef_from_defaults
2019-04-24Cycles: move shader node versioning code to CBrecht Van Lommel
Shader nodes are now shared with Eevee, so makes more sense to have it in the core and not be Cycles specific. Fix T62415: issues with append/link of old Cycles settings.
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-04-16CMake: add library deps to CMakeLists.txtCampbell Barton
Tested to work on Linux and macOS. This will be enabled once all platforms are verified. See D4684
2019-04-14CMake: prepare for BLENDER_SORTED_LIBS removalCampbell Barton
No functional change, this adds LIB definition and args to cmake files. Without this it's difficult to migrate away from 'BLENDER_SORTED_LIBS' since there are many platforms/configurations that could break when changing linking order. Manually add and enable WITHOUT_SORTED_LIBS to try building without sorted libs (currently fails since all variables are empty). This check will eventually be removed. See T46725.
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-05Cleanup: remove contributors for CMake filesCampbell Barton
Following removal from C source code. See: 8c68ed6df16d8893
2019-01-25Cleanup: BLO: move validate code into own header.Bastien Montagne
Does not make sense to keep that with BLO_writefile.h, this can also be used by read code, and some other parts of Blender (like ed_undo.c currently)...
2018-12-11Proper fix for building without BulletSergey Sharybin
Stick to an existing way of dealing with disabled feature.
2018-12-11Fix building w/o bulletCampbell Barton
2018-11-16Keymaps: replace select / action mouse systemBrecht Van Lommel
For Blender builtin configurations the option to choose the select mouse remains and is now also in the splash screen. It works by changing the keymap dynamically in the script, rather than using special events. The system of automatic switching of events was not flexible enough to deal with side effects that require further keymap changes, so it is now under more manual control in the script. This breaks compatibility for some scripts and exported key configurations. These can be fixed by replacing SELECTMOUSE, ACTIONMOUSE, EVT_TWEAK_S and EVT_TWEAK_A with appropriate LEFTMOUSE, RIGHTMOUSE, EVT_TWEAK_L and EVT_TWEAK_R events. Other than that, there should be no functional changes.
2018-09-13Cleanup: move cycles addon check out of versioningCampbell Barton
2018-09-12Fix Cycles issue moving versioning to blenloaderCampbell Barton
2018-09-12Cleanup: move preference versioning into own fileCampbell Barton
It's more convenient to keep version patching in the same place, this also splits out some function calls from version patching and supports updating UserDef structs besides the 'U'l global.
2018-08-08Cleanup: remove leftover game player code.Brecht Van Lommel
2018-07-10Eevee: LightCache: Initial ImplementationClément Foucault
This separate probe rendering from viewport rendering, making possible to run the baking in another thread (non blocking and faster). The baked lighting is saved in the blend file. Nothing needs to be recomputed on load. There is a few missing bits / bugs: - Cache cannot be saved to disk as a separate file, it is saved in the DNA for now making file larger and memory usage higher. - Auto update only cubemaps does update the grids (bug). - Probes cannot be updated individually (considered as dynamic). - Light Cache cannot be (re)generated during render.
2018-06-27Theme: set default theme 'Flatty Dark Blueberry'Campbell Barton
The theme is now stored in generated C code, which can be extracted from existing user preferences. This theme can then be used for version patching themes instead of duplicating values Note that theme versioning has been removed, since minor changes from now on won't apply well on top of 2.7x theme. Theme colors from interface_widgets.c have been removed too.
2018-06-17Merge branch 'master' into blender2.8Campbell Barton
2018-06-17Cleanup: trailing space for blenloaderCampbell Barton
2018-06-12T55454: removal of clay engineJeroen Bakker
The ClayEngine was introduced to test the blender2.8 architecture during development. As currently we have the wanted features implemented with matcaps we are going to remove the clay engine as it was never intended to be an official releasable engine Note: The test cases are never run. But when enabled will be skipped as they were implemented over the Clay Engine
2018-04-20Merge branch 'master' into blender2.8Bastien Montagne
2018-04-20Add debug tool to check validity of current file *before* saving.Bastien Montagne
It is hidden behind the --debug-io flag for now. Idea is to try to catch broken libraries state in current Main before we actually write the file on disk, should help catching and understanding what happens in Spring corruption cases.