diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2018-10-07 18:25:51 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2020-03-18 11:55:44 +0300 |
commit | 084bf7daee3ebcd57696f5b2a0c83db1b1f3d472 (patch) | |
tree | e5f37d2e47d11a23730d90afb60f7cac633e0f8c /source/blender/makesrna | |
parent | 82c51d0edbab45f014b4d0b4c0a96c000c46e232 (diff) |
Weight Paint: Implement a new Lock-Relative mode.
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
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index f974d5c563f..e96db76bd3a 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -2863,6 +2863,15 @@ static void rna_def_tool_settings(BlenderRNA *brna) "to 1.0 while weight painting"); RNA_def_property_update(prop, 0, "rna_Scene_update_active_object_data"); + prop = RNA_def_property(srna, "use_lock_relative", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE); + RNA_def_property_boolean_sdna(prop, NULL, "wpaint_lock_relative", 1); + RNA_def_property_ui_text(prop, + "WPaint Lock-Relative", + "Display bone-deforming groups as if all locked deform groups " + "were deleted, and the remaining ones were re-normalized"); + RNA_def_property_update(prop, 0, "rna_Scene_update_active_object_data"); + prop = RNA_def_property(srna, "use_multipaint", PROP_BOOLEAN, PROP_NONE); RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE); RNA_def_property_boolean_sdna(prop, NULL, "multipaint", 1); |