diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2019-12-17 16:11:31 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2020-01-18 11:43:31 +0300 |
commit | 966383138a42924b155e237a6dc32c22ace49b68 (patch) | |
tree | c5747accf220502938d745db81b30a6635bf4202 /source/blender/makesrna/intern/rna_userdef.c | |
parent | 1f92e9903fb7169641244a6d049158c7847312ac (diff) |
Weight Paint: implement a red shade for bones with locked weights.
Blender supports locking vertex groups to prevent changes to the
weights. However, as mentioned in comments for D3837, it is hard
to use this because there is no interface for locking in 3D View.
This adds a red shade to bones that are associated with a locked
weight group during weight paint mode, as the first step to adding
such interface. The next step is adding a pie menu for lock/unlock.
Differential Revision: https://developer.blender.org/D6533
Diffstat (limited to 'source/blender/makesrna/intern/rna_userdef.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 56f19d313fd..fc2b074d6d1 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -2231,6 +2231,14 @@ static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Bone Solid", ""); RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + prop = RNA_def_property(srna, "bone_locked_weight", PROP_FLOAT, PROP_COLOR_GAMMA); + RNA_def_property_array(prop, 4); + RNA_def_property_ui_text( + prop, + "Bone Locked Weight", + "Shade for bones corresponding to a locked weight group during painting"); + RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); + /* misc */ prop = RNA_def_property(srna, "bundle_solid", PROP_FLOAT, PROP_COLOR_GAMMA); |