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
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-11-30Cleanup: capitalize NOTE tagCampbell Barton
2021-11-23Fix T93231: crash when overwriting vertex group with other domainJacques Lucke
The problem was that we forgot to actually remove the vertex group when it should be deleted. We only removed all the data that was attached to it. Differential Revision: https://developer.blender.org/D13326
2021-08-06Cleanup: use MEM_SAFE_FREE macroCampbell Barton
2021-07-13Refactor: Move vertex group names to object dataHans Goudey
This commit moves the storage of `bDeformGroup` and the active index to `Mesh`, `Lattice`, and `bGPdata` instead of `Object`. Utility functions are added to allow easy access to the vertex groups given an object or an ID. As explained in T88951, the list of vertex group names is currently stored separately per object, even though vertex group data is stored on the geometry. This tends to complicate code and cause bugs, especially as geometry is created procedurally and tied less closely to an object. The "Copy Vertex Groups to Linked" operator is removed, since they are stored on the geometry anyway. This patch leaves the object-level python API for vertex groups in place. Creating a geometry-level RNA API can be a separate step; the changes in this commit are invasive enough as it is. Note that opening a file saved in 3.0 in an earlier version means the vertex groups will not be available. Differential Revision: https://developer.blender.org/D11689
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-06-10DataTransfer: Fix vertices being wrongly added to vgroup.Bastien Montagne
Previously, a vertex from destination mesh would always be added to all transferred vgroup (with a 0.0 weight), even if none of its matching sources in source mesh belonged to the matching source vgroups. Now a destination vertex is only added to a given destination vgroup if at least one of its source vertices belong to the matching source vgroup. Issue found and initial investigation by @pls in D11524, thanks!
2021-01-12Weight Paint: avoid creating very small values with locked weights.Alexander Gavrilov
When painting using Auto-Normalize or Lock Relative with some groups locked, the locked weights may not add up precisely to 1 because of precision limitations, which results in creating nonzero weights close to FLT_EPSILON. With Lock Relative display mode this is very obvious and annoying (random red points amid black or blue), so add an epsilon check to consider less than 1e-6 unlocked weight to be the same as 0. In addition, in cases when no weight can be painted due to locks, don't create vertex group entries at all if they don't exist yet. Also, don't run Auto Normalize when not painting a deform group. Differential Revision: https://developer.blender.org/D10000
2020-09-09Cleanup: reduce variable scopesJacques Lucke
2020-09-04Cleanup: Clang-Tidy readability-inconsistent-declaration-parameter-name fixSebastian Parborg
No functional changes
2020-08-29Cleanup: remove paranoid 'MDeformVert.totweight < 0' checkCampbell Barton
This was added in 1cb7267a9f9f1, however the behavior before this would have failed on negative values already. Also negative values here would fail in many other places.
2020-08-28Revert "tmp"Hans Goudey
This reverts commit b78a439e9071f83baf296d52c0c1a458aecd2938. This was committed by mistake, and including BLI_winstuff.h on non-windows platforms results in an error.
2020-08-28tmpGermano Cavalcante
2020-08-28Cleanup: Fix build error with msvcRay Molenkamp
`ssize_t` is not a standardized type (it's a posix type) given the line in question here is calculating the size of a memory allocation there's no logical way this should ever be negative. I do not know this code too well and was unsure if `mdverts->totweight` could ever be < 0, so I protected it with a clamp, just in case.
2020-08-28Refactor: move defvert .blend IO to blenkernelJacques Lucke
This is part of T76372.
2020-08-07Cleanup: Blenkernel, Clang-Tidy else-after-return fixesSybren A. Stüvel
This addresses warnings from Clang-Tidy's `readability-else-after-return` rule in the `source/blender/blenkernel` module. No functional changes.
2020-07-13Clang Tidy: enable readability-non-const-parameter warningJacques Lucke
Clang Tidy reported a couple of false positives. I disabled those `NOLINTNEXTLINE`. Differential Revision: https://developer.blender.org/D8199
2020-07-10Revert "Fix T78296: Performance - Use Binary Search for MDeformWeight"Brecht Van Lommel
This reverts commit 39b525e0f07fa25dcda54226ade789959b642dec and 3121015dceb1d269d79690c8f15c8e1406c9b09f as tests are failing.
2020-07-10Fix T78296: Performance - Use Binary Search for MDeformWeightJeroen Bakker
Use binary search for querying deform weights. Spring 02_020_A.anim.blend on Ryzen 1700X goes from 12.4 to 12.7fps. During profiling it was detected that adding new items to the head was faster than adding to the tail. Reviewed By: Campbell Barton Differential Revision: https://developer.blender.org/D8127
2020-06-13Cleanup: use const arguments to deform functionsCampbell Barton
This changes curve deform code not to set the objects inverse matrix, this shouldn't cause problems as it's not used elsewhere afterwards.
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-19Cleanup: use '\' for doxygen commandsCampbell Barton
2020-03-18Weight Paint: Implement a new Lock-Relative mode.Alexander Gavrilov
This check box alters how weights are displayed and painted, similar to Multi Paint, but in a different way. Specifically, weights are presented as if all locked vertex groups were deleted, and the remaining deform groups normalized. The new feature is intended for use when balancing weights within a group of bones while all others are locked. Enabling the option presents weight as if the locked bones didn't exist, and their weight was proportionally redistributed to the editable bones. Conversely, the Multi-Paint feature allows balancing a group of bones as a whole against all unselected bones, while ignoring weight distribution within the selected group. This mode also allows temporarily viewing non-normalized weights as if they were normalized, without actually changing the values. Differential Revision: https://developer.blender.org/D3837
2020-03-06Cleanup: rename 'verify' to 'ensure' for argument nameCampbell Barton
2020-03-06Cleanup: use 'BKE_' prefix for BKE_deform API callsCampbell Barton
- Use 'BKE_object_defgroup' prefix for object functions. - Rename 'defvert_verify_index' to 'defvert_ensure_index' since this adds the group if it isn't found.
2020-02-11Fix T56108: Crash editing corrupted vertex groupsCampbell Barton
While the file in this report had corrupted values, this is avoidable without adding any extra overhead. Use unsigned vertex group indices since we don't need negative values, this is an alternative to checking they aren't negative in many places. Vertex group values over INT_MAX is still considered invalid, so any accidental unsigned wrapping won't be silently ignored.
2020-01-14Fix T68480: Normalize All weights with lock Active bugSybren A. Stüvel
The original code had 0 as a magic number in the test whether the weight belongs to a locked group, instead of comparing it to the actual group number. Thanks @mano-wii for providing the diff.
2019-05-03Cleanup: warningsCampbell Barton
Quiet extra-semi-stmt & missing-variable-declarations
2019-04-27Cleanup: comments (long lines) in blenkernelCampbell Barton
2019-04-22Cleanup: style, use braces for blenkernelCampbell Barton
2019-04-18Cleanup: comment blocksCampbell 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-11Cleanup: comment indentation & spellingCampbell Barton
2019-02-08Fix T61255: Mesh Data Transfer: Do not abort when destination has not all ↵Bastien Montagne
source data layers. Originally, when transferring all source data layers to destination meshes, code would abort in case destination did not have all needed layers, and creating them was not allowed. Now, it will instead transfer data to layers that exists, merely skipping source ones for which it cannot find a matching destination.
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: blank lines over doxy headersCampbell Barton
2018-11-27VGroup search: do not try to search for empty string.Bastien Montagne
Vgroups always have a non-empty name, this is just loss of time...
2018-10-26Fix unreported: Crash when adding lattice vertex groupDalai Felinto
2018-08-23Rename: *_batch_cache_dirty > *_batch_cache_dirty_tagDalai Felinto
2018-07-31New Grease Pencil object for 2D animationAntonioya
This commit merge the full development done in greasepencil-object branch and include mainly the following features. - New grease pencil object. - New drawing engine. - New grease pencil modes Draw/Sculpt/Edit and Weight Paint. - New brushes for grease pencil. - New modifiers for grease pencil. - New shaders FX. - New material system (replace old palettes and colors). - Split of annotations (old grease pencil) and new grease pencil object. - UI adapted to blender 2.8. You can get more info here: https://code.blender.org/2017/12/drawing-2d-animation-in-blender-2-8/ https://code.blender.org/2018/07/grease-pencil-status-update/ This is the result of nearly two years of development and I want thanks firstly the other members of the grease pencil team: Daniel M. Lara, Matias Mendiola and Joshua Leung for their support, ideas and to keep working in the project all the time, without them this project had been impossible. Also, I want thanks other Blender developers for their help, advices and to be there always to help me, and specially to Clément Foucault, Dalai Felinto, Pablo Vázquez and Campbell Barton.
2018-06-29Cleanup: remove another bunch of DM usages, includes etc.Bastien Montagne
2018-06-16Merge branch 'master' into blender2.8Bastien Montagne
2018-06-16Fix T55427: Removing Vertex Group used by Data Transfer Modifier results in ↵Bastien Montagne
crash. Only fixing crash, proper handling (a.k.a remapping) of all possible cases here, for all possible data layers, is rather involved...
2018-01-10Merge branch 'master' into blender2.8Campbell Barton
2018-01-10Cleanup: comment block alignmentCampbell Barton
2017-08-22Cleanup: naming for mesh dirty flagsCampbell Barton
- NOCHECK -> ALL - ALL -> MAYBE_ALL Where 'MAYBE_ALL' checks to see if the mesh has changed. This is clearer that `BKE_MESH_BATCH_DIRTY_ALL` is dirty and going to be updated without any guess-work.
2017-07-27Merge branch 'master' into blender2.8Campbell Barton
2017-07-26Fix T52176: Bevel doesn't correctly work with default empty Vgroup.Bastien Montagne
`defvert_array_find_weight_safe()` was confusing 'invalid vgroup' and 'valid but totally empty vgroup' cases. Note that this also affected at least ShrinkWrap and SimpleDeform modifiers.