69433a181efe5f95f281da1f1af9f2266b2942f8
When manually setting a group's vertex weight, auto-normalization would fail in some circumstances, such as when all other groups are locked. The root cause of this issue was our approach for ensuring that the weight specified by the user remained as-is when possible during normalization. Rather than "when possible", it erroneously *always* ensured the weight stayed as-is even when that made normalization impossible. It came down to this: 1. Normalization is done as a post process, with no knowledge of what changes were just made to the weights. 2. In order to (try to) make up for that and ensure that the just-set weight remains as the user specified, the active group was temporarily locked during normalization, which could prevent normalization in some cases. This PR fixes the issue by introducing a new internal-only concept of "soft locked" vertex groups to the normalization functions, intended to be used in exactly these cases where there are weights that have just been set and we want to avoid altering them when possible. Soft-locked groups are left untouched whenever normalization is achievable without touching them, but are still modified if normalization can't be achieved otherwise. This has been implemented by introducing a new bool array alongside the "locked" bool array in the core normalization functions. Although all uses in this PR only ever specify a single group as "soft locked", using a bool array will make it easy to use this concept in other weight painting tools in the future, which may modify more than one group at once. Pull Request: https://projects.blender.org/blender/blender/pulls/141045
…
Blender
Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline—modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.
Project Pages
Development
License
Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different but compatible license.
See blender.org/about/license for details.
Description
Languages
C++
78%
Python
14.9%
C
2.9%
GLSL
1.9%
CMake
1.2%
Other
0.9%
