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-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-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-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-07-16Cleanup: sort struct declarationsCampbell 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-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-30Cleanup: sort struct declarationsCampbell Barton
2020-09-04Cleanup: Clang-Tidy readability-inconsistent-declaration-parameter-name fixSebastian Parborg
No functional changes
2020-08-28Refactor: move defvert .blend IO to blenkernelJacques Lucke
This is part of T76372.
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-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-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-02-07Cleanup: Improve usage of extern "C"Jacques Lucke
2019-04-27Cleanup: comments (long lines) in blenkernelCampbell 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-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-02Cleanup: remove author/date info from doxy headersCampbell Barton
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-28Cleanup: sort forward declarations of enum & structCampbell Barton
Done using: source/tools/utils_maintenance/c_sort_blocks.py
2018-06-29Cleanup: remove another bunch of DM usages, includes etc.Bastien 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-01-16Cleanup/refactor: move BKE_deform_flip_side_name & co to BLI_string_utilsBastien Montagne
Functions like that do not have anything to do in BKE really, even less when actually more used for bones than vgroups!
2017-01-16Cleanup/refactor: get rid of fixed name limit in BKE_deform_flip_side_name & co.Bastien Montagne
Those were forcing to use vgroup name define in bones area, or even mixing with maxbonename... ugly, and totally avoidable.
2016-02-08Fix group flipping when syncing mirror weightsAlexander Gavrilov
Corrects mirror syncing for invert, levels & smooth. Note that the code changed to process mirroring even if both verts are selected, since group flipping can mean that is still meaningful.
2016-02-08Cleanup: use doxy comments for deform.cCampbell Barton
2016-01-20Weight Paint: 'Sample' now supports multi-paintAlexander Gavrilov
Since the coloring uses sum or average of the weights of all selected groups, the weight pick tool should also use that instead of reading the weight of the single active group that you can't see.
2015-03-28Cleanup: redundant struct declarationsCampbell Barton
2015-01-09Transfer Data: add main core code and operators.Bastien Montagne
This add code needed to map a CD data layout from source mesh towards destination one, and code needed to actually transfer data, using BKE's mesh remap generated data. This allows to transfer most CD layers (vgroups, vcols, uvs...) as well as fake, boolean ones (like smooth/sharp edges/faces, etc.). Some types are not yet transferable, mainly shape keys, this is known TODO. Data transfer can also use some advanced mixing in some cases (mostly, vgroups and vcols). Notes: * New transfer operators transfer data from active object towards selected ones. * Modifier will be committed separately. * Old weight transfer code (for vgroups) is kept for now, mostly because it is the only usable one in weightpaint mode (it transfers from selected object to active one, this is not sensible in Object mode, but needed in WeightPaint one). This will be addressed soon. Again, heavily reviewed and enhanced by Campbell, thanks!
2013-11-16code cleanup: rename flip_side_name to BKE_deform_flip_side_nameCampbell Barton
2013-10-10Weight Paint Tools: Add "Subset" option to "Normalize All"Irie Shinsuke
This option is needed when vertex groups are used for both armature deformation and the other purpose such as influence of mesh modifier. Thanks to Campbell for code review!
2013-07-04stop adding groups from changing the active group with weight transfer, add ↵Campbell Barton
BKE_defgroup_new function.
2013-06-23Added polished Vertex Weights Panel (properties sidebar)Gaia Clary
2013-05-15use bool arrays rather then char for weight paint lock/select arraysCampbell Barton
2013-03-21code cleanup: use bool where values are true/false, for view3d and related ↵Campbell Barton
functions.
2013-02-22new weight paint draw option to display unweighted vertices with the option ↵Campbell Barton
to check on the active group or all groups. notes: - vertices with zero weights are considered the same as vertices outside of a group. - currently these show black but this can be made a theme color. - multi-paint overrides this option (noted in description)
2013-02-11fix for own bug - memory leak when cancelling weight gradient toolCampbell Barton
2012-12-28code cleanup:Campbell Barton
- free_dverts -> BKE_defvert_array_free - copy_dverts -> BKE_defvert_array_copy also move the functions from BKE_mesh into BKE_deform
2012-10-30minor changes to select similar,Campbell Barton
- replace ngon_fake_area() with generic call to BM_face_calc_area(). - add defvert_find_shared() utility function.
2012-09-05fix [#29431] "Normalize All" from Weight Tools don't work correctlyCampbell Barton
2012-05-13code cleanup: header cleanup and remove some duplicate defines.Campbell Barton
2012-04-30code cleanup: header cleanupCampbell Barton
2012-04-30- improve select grouped prefix/suffix from recent patchCampbell Barton
- added select similar direction (Y axis)
2012-04-29patch [#30834] Quick Hack: Select similar for bones in edit modeCampbell Barton
from Felix Schlitter (dalai) made some changes to select length measurement.