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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2016-01-19 01:14:35 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-01-19 01:14:35 +0300
commit3b3b35546e2a0752db5460b2cc9246f11f4219ee (patch)
treefd94f114f87d4df74c4b7d8fb74b874e08c2db47 /build_files
parent4e6ad37fc118ca6be1d9190e482e8101ba7f093e (diff)
Weight Paint: Add lock-aware normalize
D1713 from @angavrilov (with own edits) The way current weight paint code works is that instead of making normalization lock aware, a separate `enforce_locks` function is called to do a different kind of normalization, hoping that by the time real normalize is called, there is nothing for it to do. The problem is that: - That different normalization is based on adding the same amount to all unlocked groups, whereas true normalize uses multiplication to preserve ratio between them. The multiplicative approach should match the way weights operate better. - If `enforce_locks` fails to achieve perfect normalization, true normalize will change locked groups. Try to fix this by replacing `enforce_locks` with true lock-aware normalization support. Supporting locked groups in normalize means that freezing the active group can make full normalization impossible if too much weight was added or removed, so it may be necessary to do two normalize passes. This is similar to how enforce_locks operates. Also, now there is no need to go through the multi-paint branch just because of the locks. In the actual multi-paint case, the same normalize code can be used via a temporary flag array that represents the union of selected and locked groups. User-visible effect should be: - Auto-Normalize doesn't change behavior vertex to vertex depending on whether it has any locked groups. - It never changes locked groups; if you lock some groups and start painting with seriously non-normalized weights, it's assumed you intended that. - It never adds vertices to new groups, since the computer can't do that intelligently anyway - it was especially broken in case of mirroring. - It always acts to preserve the ratio between groups it changes, instead of (sometimes, see point 1) adding or subtracting the same amount.
Diffstat (limited to 'build_files')
0 files changed, 0 insertions, 0 deletions