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-01-17Alembic: add support for reading override layersKévin Dietrich
Override layers are a standard feature of Alembic, where archives can override data from other archives, provided that the hierarchies match. This is useful for modifying a UV map, updating an animation, or even creating some sort of LOD system where low resolution meshes are swapped by high resolution versions. It is possible to add UV maps and vertex colors using this system, however, they will only appear in the spreadsheet editor when viewing evaluated data, as the UV map and Vertex color UI only show data present on the original mesh. Implementation wise, this adds a `CacheFileLayer` data structure to the `CacheFile` DNA, as well as some operators and UI to present and manage the layers. For both the Alembic importer and the Cycles procedural, the main change is creating an archive from a list of filepaths, instead of a single one. After importing the base file through the regular import operator, layers can be added to or removed from the `CacheFile` via the UI list under the `Override Layers` panel located in the Mesh Sequence Cache modifier. Layers can also be moved around or hidden. See differential page for tests files and demos. Reviewed by: brecht, sybren Differential Revision: https://developer.blender.org/D13603
2022-01-06Cleanup: USD/ABC, remove `const` from pass-by-value paramsSybren A. Stüvel
Remove `const` from pass-by-value parameters in function declarations. The variables passed as parameters can never be modified by the function anyway, so declaring them as `const` is meaningless. Having the declaration there could confuse, especially as it suggests it does have a meaning, training people to write meaningless code.
2021-12-07Cleanup: move public doc-strings into headers for 'blenkernel'Campbell Barton
- Added space below non doc-string comments to make it clear these aren't comments for the symbols directly below them. - Use doxy sections for some headers. - Minor improvements to doc-strings. Ref T92709
2021-08-21Cleanup: spelling in comments & minor cleanupCampbell Barton
Also hyphenate 'mouse-move' use doxy sections in render_update.c & move function comment from the header to the source.
2021-08-19Cycles: experimental integration of Alembic procedural in viewport renderingKévin Dietrich
This patch exposes the Cycles Alembic Procedural through the MeshSequenceCache modifier in order to use and test it from Blender. To enable it, one has to switch the render feature set to experimental and activate the Procedural in the modifier. An Alembic Procedural is then created for each CacheFile from Blender set to use the Procedural, and each Blender object having a MeshSequenceCache modifier is added to list of objects of the right procedural. The procedural's parameters derive from the CacheFile's properties which are already exposed in the UI through the modifier, although more Cycles specific options might be added in the future. As there is currently no cache controls and since we load all the data at the beginning of the render session, the procedural is only available during viewport renders at the moment. When an Alembic procedural is rendered, data from the archive are not read on the Blender side. If a Cycles render is not active and the CacheFile is set to use the Cycles Procedural, bounding boxes are used to display the objects in the scene as a signal that the objects are not processed by Blender anymore. This is standard in other DCCs. However this does not reduce the memory usage from Blender as the Alembic data was already loaded either during an import or during a .blend file read. This is mostly a hack to test the Cycles Alembic procedural until we have a better Blender side mechanism for letting renderers load their own geometry, which will be based on import and export settings on Collections (T68933). Ref T79174, D3089 Reviewed By: brecht, sybren Maniphest Tasks: T79174 Differential Revision: https://developer.blender.org/D10197
2020-10-07Refactor: remove `BKE_<id_type>_copy` functions.Bastien Montagne
Those were only shallow wrappers around `BKE_id_copy`, barely used (even fully unused in some cases), and we want to get rid of those ID-specific helpers for the common ID management tasks. Also prevents weird custom behaviors (like `BKE_object_copy`, who was the only basic ID copy function to reset user count of the new copy to zero). Part of 71219.
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-03-09Cleanup: CacheFile: Move to IDTypeInfo and remove unused BKE API.Bastien Montagne
2020-03-05Cleanup: formatting, strip trailing spaceCampbell Barton
2020-03-04Refactor ID make local to use a single flag parameter.Bastien Montagne
Instead of using anonymous booleans flags, also allows to keep the same behavior in all cases, without needing special handling from calling code for our beloved oddballs object proxies...
2019-08-25Cleanup: redundant struct declarationsCampbell Barton
2019-05-01Alembic: integrate cache file into the dependency graphBrecht Van Lommel
* The cache file datablock is now evaluated as part of the dependency graph, creating/freeing the Alembic file handle matching the current frame. Modifiers and constraints depend on this evaluation. * Cache file handles and readers now only exist on COW datablocks, never the original ones. * Object data paths are flushed back to the original for the user interface. * The cache file keeps a list of all readers associated with its handle, and automatically frees them when the handle is freed. This kind of sharing of data across datablocks is weak but we have no better mechanism for it. Fix T62720: Alembic sequences not working and crashing Differential Revision: https://developer.blender.org/D4774
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-05-31Animation: Pass dependency graph to animation systemSergey Sharybin
This way we allow animation system to make decisions based on which context dependency graph is coming from, and whether it belongs to an active edit window or not.
2017-08-07Refactor ID copying (and to some extent, ID freeing).Bastien Montagne
This will allow much finer controll over how we copy data-blocks, from full copy in Main database, to "lighter" ones (out of Main, inside an already allocated datablock, etc.). This commit also transfers a llot of what was previously handled by per-ID-type custom code to generic ID handling code in BKE_library. Hopefully will avoid in future inconsistencies and missing bits we had all over the codebase in the past. It also adds missing copying handling for a few types, most notably Scene (which where using a fully customized handling previously). Note that the type of allocation used during copying (regular in Main, allocated but outside of Main, or not allocated by ID handling code at all) is stored in ID's, which allows to handle them correctly when freeing. This needs to be taken care of with caution when doing 'weird' unusual things with ID copying and/or allocation! As a final note, while rather noisy, this commit will hopefully not break too much existing branches, old 'API' has been kept for the main part, as a wrapper around new code. Cleaning it up will happen later. Design task : T51804 Phab Diff: D2714
2017-06-14Merge branch 'master' into blender2.8Bastien Montagne
2017-06-14Make whole ID copying code use const source pointer.Bastien Montagne
Noisy change, but safe, and better do it sooner than later if we are to rework copying code. Also, previous commit shows this *is* useful to catch some mistakes.
2017-04-25Alembic import: don't use global mainSybren A. Stüvel
2017-04-25Alembic import: removed BaseLegacy from BKE_cachefile_cleanSybren A. Stüvel
Now we just iterate over all objects. It may be a better idea to use a smarter approach for performance. However, since this function is not called regularly (only when changing Alembic file paths), it's not a very big deal.
2017-03-11Cleanup: code style & cmakeCampbell Barton
2016-10-29Alembic: store a pointer to the object reader in the cache modifiers andKévin Dietrich
constraints. This avoids traversing the archive everytime object data is needed and gives an overall consistent ~2x speedup here with files containing between 136 and 500 Alembic objects. Also this somewhat nicely de- duplicates code between data creation (upon import) and data streaming (modifiers and constraints). The only worying part is what happens when a CacheFile is deleted and/or has its path changed. For now, we traverse the whole scene and for each object using the CacheFile we free the pointer and NULL-ify it (see BKE_cachefile_clean), but at some point this should be re-considered and make use of the dependency graph.
2016-10-18[msvc] Minor cleanup in blenkernel.lazydodo
this patch resolves the following warnings; ``` Warning C4028 formal parameter 1 different from declaration blenkernel\intern\ocean.c 764 Warning C4098 'attach_stabilization_baseline_data': 'void' function returning a value blenkernel\intern\tracking_stabilize.c 139 Warning C4028 formal parameter 3 different from declaration blenkernel\intern\cachefile.c 148 Warning C4028 formal parameter 3 different from declaration blenkernel\intern\paint.c 413 Warning C4028 formal parameter 1 different from declaration blenkernel\intern\editderivedmesh.c 591 Warning C4028 formal parameter 3 different from declaration blenkernel\intern\library_remap.c 709 Warning C4028 formal parameter 1 different from declaration blenkernel\intern\ocean.c 754 Warning C4028 formal parameter 1 different from declaration blenkernel\intern\ocean.c 758 Warning C4028 formal parameter 1 different from declaration blenkernel\intern\ocean.c 759 Warning C4028 formal parameter 1 different from declaration blenkernel\intern\ocean.c 763 Warning C4028 formal parameter 1 different from declaration blenkernel\intern\ocean.c 764 Warning C4028 formal parameter 1 different from declaration blenkernel\intern\ocean.c 765 Warning C4028 formal parameter 1 different from declaration blenkernel\intern\ocean.c 769 Warning C4028 formal parameter 1 different from declaration blenkernel\intern\ocean.c 770 Warning C4028 formal parameter 1 different from declaration blenkernel\intern\DerivedMesh.c 3458 ``` It's mostly things where the signature in the .h and the actual implementation in the .c do not match. And a bunch functions who do not match the TaskRunFunction declaration cause they leave out the __restrict keyword. Reviewers: brecht, juicyfruit, sergey Reviewed By: sergey Subscribers: Blendify Differential Revision: https://developer.blender.org/D2268
2016-09-19CacheFile: make sure SpinLock is destroyed when exiting Blender.Kévin Dietrich
Missed in rB62b1cdd6.
2016-08-26Fix over creation of cache files handles (leading to memory leaks).Kévin Dietrich
Multiple threads could create multiple handles for the same cache file, so protect handle creation with a mutex, to make sure only one is created.
2016-08-06Basic Alembic supportKévin Dietrich
All in all, this patch adds an Alembic importer, an Alembic exporter, and a new CacheFile data block which, for now, wraps around an Alembic archive. This data block is made available through a new modifier ("Mesh Sequence Cache") as well as a new constraint ("Transform Cache") to somewhat properly support respectively geometric and transformation data streaming from alembic caches. A more in-depth documentation is to be found on the wiki, as well as a guide to compile alembic: https://wiki.blender.org/index.php/ User:Kevindietrich/AlembicBasicIo. Many thanks to everyone involved in this little project, and huge shout out to "cgstrive" for the thorough testings with Maya, 3ds Max, Houdini and Realflow as well as @fjuhec, @jensverwiebe and @jasperge for the custom builds and compile fixes. Reviewers: sergey, campbellbarton, mont29 Reviewed By: sergey, campbellbarton, mont29 Differential Revision: https://developer.blender.org/D2060