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-08-30Attributes: Improve custom data initialization optionsHans Goudey
When allocating new `CustomData` layers, often we do redundant initialization of arrays. For example, it's common that values are allocated, set to their default value, and then set to some other value. This is wasteful, and it negates the benefits of optimizations to the allocator like D15082. There are two reasons for this. The first is array-of-structs storage that makes it annoying to initialize values manually, and the second is confusing options in the Custom Data API. This patch addresses the latter. The `CustomData` "alloc type" options are rearranged. Now, besides the options that use existing layers, there are two remaining: * `CD_SET_DEFAULT` sets the default value. * Usually zeroes, but for colors this is white (how it was before). * Should be used when you add the layer but don't set all values. * `CD_CONSTRUCT` refers to the "default construct" C++ term. * Only necessary or defined for non-trivial types like vertex groups. * Doesn't do anything for trivial types like `int` or `float3`. * Should be used every other time, when all values will be set. The attribute API's `AttributeInit` types are updated as well. To update code, replace `CD_CALLOC` with `CD_SET_DEFAULT` and `CD_DEFAULT` with `CD_CONSTRUCT`. This doesn't cause any functional changes yet. Follow-up commits will change to avoid initializing new layers where the correctness is clear. Differential Revision: https://developer.blender.org/D15617
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
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-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2020-10-23Multires: Cleanup, better function namingSergey Sharybin
Hopefully it makes it more clear, and also allows to introduce initialization from pre-created Subdiv descriptor.
2020-08-26Cleanup: spellingCampbell Barton
2020-08-24Fix T80039: Do not subdivide with Multires is mesh has no facesPablo Dobarro
This skips the subdivision operation if the mesh has no loops, avoiding the crash. Reviewed By: sergey Maniphest Tasks: T80039 Differential Revision: https://developer.blender.org/D8696
2020-05-18Merge branch 'blender-v2.83-release'Sergey Sharybin
2020-05-18Fix T76573: Make links with Multires leading to crashSergey Sharybin
2020-05-13Multires: Fix wrong or missing mask propagationSergey Sharybin
Propagation when changing sculpt level was missing. In fact, the mask was simply completely removed when changing sculpt level. Subdivision worked for simple and linear subdivision, but Catmull-Clark was giving empty results. Fixes propagation part of T76386.
2020-05-09Cleanup: double-spaces in commentsCampbell Barton
2020-05-08Fix T76498: Refactoring - Rename BKE modifiers funtionsAntonio Vazquez
2020-04-30Multires: Subdivide Simple and Subdivide LinearPablo Dobarro
This introduces two alternative subdivision modes that generates displacement on the grids that look as Simple subdivisions but while using the Catmull-Clark subdivision type in the modifier. This way, Simple and Catmull-Clark subdivision can be combined when creating new levels if needed, for example, to sculpt hard surface objects. Subdivide simple smooths the sculpted data when creating a new subdivision level. Subdivide linear also preserves the sharpness in the sculpted data. Reviewed By: sergey Differential Revision: https://developer.blender.org/D7415
2020-04-29Cleanup: use doxy sections for multires & subdiv sourcesCampbell Barton
2020-04-24T75631: New multires shrinkage problemSergey Sharybin
The old Subdivide button was behaving as if subdivision modifier was applied on top of the multires. This was the source of shrinkage since the behavior of the limit surface: limit surface of a sparse point from another limit surface makes final result appear smaller. The new behavior is based on propagating delta against base mesh's limit surface to the top level. Effectively, this is as if we've sculpted on old top level and then propagated to the new top level. Differential Revision: https://developer.blender.org/D7505
2020-03-19Cleanup: spellingCampbell Barton
2020-03-17Multires: Fix Apply Base when there are deform modifiersSergey Sharybin
Their effect was applied twice after hitting Apply Base since the operator was also applying deformation caused by those modifiers.
2020-03-17Multires: Cleanup, argument naming and orderSergey Sharybin
Use full argument name. Also order arguments in the generosity order: from depsgraph (which has everything) to object (which contains multires) specific multires modifier.
2020-03-17Multires: Cleanup, remove redundant argumentSergey Sharybin
Scene can be queried from the dependency graph.
2020-03-13Fix T74686: Loading btx file in multires modifier is not workingSergey Sharybin
Was happening when object does not have CD_MDISPS allocated yet. Need to make sure totdisp and level is specified on CD_MDISPS data prior to loading (as the load expects them to be properly set).
2020-03-13Multires: Fix loosing sculpt data when using external BTX fileSergey Sharybin
2020-03-13Multires: Fix Subdivide, Reshape and Apply BaseSergey Sharybin
This change fixes artifacts produced by these operations. On a technical aspect this is done by porting all of the operations to the new subdivision surface implementation which ensures that tangent space used to evaluate modifier and those operations is exactly the same (before modifier will use new code and the operations will still use an old one). The next step is to get sculpting on a non-top level to work, and that actually requires fixes in the undo system.
2020-02-28Multires: Move current reshaping/propagation logic to legacy fileSergey Sharybin
It will eventually rewritten. This commit prepares some clean space to start this process. So far no functional changes.
2020-02-10Cleanup/refactor: Rename `BKE_library` files to `BKE_lib`.Bastien Montagne
Note that `BKE_library.h`/`library.c` were renamed to `BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here. Part of T72604.
2019-09-26Fix T70163: Error painting with Subdivision at end of stackSergey Sharybin
Deformation of subdivision surface modifier was using wrong coordinates for the coarse mesh: as the modifier flow goes the coordinates are to be taken from the input array of coordinates.
2019-09-07Cleanup: use post increment/decrementCampbell Barton
When the result isn't used, prefer post increment/decrement (already used nearly everywhere in Blender).
2019-08-21Cleanup: vertex coordinate access, naming & minor changesCampbell Barton
This also splits vertex access and allocation so it's possible to copy coordinates into an existing array without allocating it.
2019-07-30BLI_task: Cleanup: rename some structs to make them more generic.Bastien Montagne
TLS and Settings can be used by other types of parallel 'for loops', so removing 'Range' from their names. No functional changes expected here.
2019-06-17Cleanup: comment, RNA spellingCampbell 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-03-07Refactor CDData masks, to have one mask per mesh elem type.Bastien Montagne
We already have different storages for cddata of verts, edges etc., 'simply' do the same for the mask flags we use all around Blender code to request some data, or limit some operation to some layers, etc. Reason we need this is that some cddata types (like Normals) are actually shared between verts/polys/loops, and we don’t want to generate clnors everytime we request vnors! As a side note, this also does final fix to T59338, which was the trigger for this patch (need to request computed loop normals for another mesh than evaluated one). Reviewers: brecht, campbellbarton, sergey Differential Revision: https://developer.blender.org/D4407
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-24Multires reshape: correct grids level allocationSergey Sharybin
Similar to masking grids, need to also check existing grid level. This is because edit mode might leave allocated grid with 0 levels.
2019-01-18Multires: Correct averagingSergey Sharybin
Before that only normal component was averaged, which is not really correct. Unfortunately, the new code is somewhat slower due to more involved math to deal properly with non-quad faces, but the plan is to move averaging from runtime to edit time, This means, that mdisps will always be continuous around the edges and no averaging on every frame change of animated character will be needed.
2019-01-18Multires: Ensure continuity when reshaping from objectSergey Sharybin
2019-01-18Multires: Simplify reshaping codeSergey Sharybin
The idea is to run reshaping for every boundary vertex of a grid rather than trying to copy boundary grid elements. While this is somewhat slower, this avoids all this tangent flipping magic, which tempts to be rather tricky and fragile.
2019-01-18Multires: Fix spike issues when sculpting on trianglesSergey Sharybin
The boundary copy code was not dealing correct with flipping tangent vectors, hence causing discontinuity in the final positions. Now we only copy boundaries for quads, where we know how to deal with tangent vectors and where we know that this is needed. More clear solution could be to change the code in a way that handles handles displacement grids of quads in the same way as it's done for non-quad faces.
2019-01-16Multires: Cleanup, commentsSergey Sharybin
2019-01-06Cleanup: add trailing commas to structsCampbell Barton
Needed for clang formatting to workaround bug/limit, see: T53211
2018-12-06Fix T58310: Crash when removing multires modifier from sculpt objectSergey Sharybin
2018-11-16Fix T57566: Blender 2.8 crashes with the new multiresSergey Sharybin
2018-11-06Multires: Refactor propagation to the higher levelsSergey Sharybin
Now it is forumlated in terms of deltas, and consists of the following steps: - Original displacement at the reshape level are being backed up. - New displacement is being written by the reshape routines. - Delta of the displacement is calculated. - Deltas are propagated to the higher levels, which also includes their interpolation/ - Original displacement is restored. - New interpolated displacements are added to the original ones. This is a base ground for the upcoming change related on using Catmull-Clark smoothing for the deltas instead of linear interpolation. Currently is no changes for artists, just preparing for upcoming work.
2018-11-02Multires: Cleanup, namingSergey Sharybin
First of all, follow our naming convention to use module prefix. Second of all, mesh is being created and is to be freed, we also have convention for such function names.
2018-11-01Subdiv: Cleanup, better naming yet againSergey Sharybin
2018-11-01Subdiv: Cleanup, de-duplicate some codeSergey Sharybin
2018-11-01Subdiv: Cleanup, de-duplicate tangent matrix calculationSergey Sharybin
2018-11-01Subdiv: Cleanup. better namingSergey Sharybin
2018-11-01Subdiv: Cleanup, deduplicate some codeSergey Sharybin