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/blenloader/intern | |
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/blenloader/intern')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 2 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_userdef.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 6a54fc8f59e..e1424da2207 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -3874,7 +3874,7 @@ static void direct_link_bones(FileData *fd, Bone *bone) bone->bbone_next = newdataadr(fd, bone->bbone_next); bone->bbone_prev = newdataadr(fd, bone->bbone_prev); - bone->flag &= ~BONE_DRAW_ACTIVE; + bone->flag &= ~(BONE_DRAW_ACTIVE | BONE_DRAW_LOCKED_WEIGHT); link_list(fd, &bone->childbase); diff --git a/source/blender/blenloader/intern/versioning_userdef.c b/source/blender/blenloader/intern/versioning_userdef.c index b1f70848bdc..e1ea4e3bb24 100644 --- a/source/blender/blenloader/intern/versioning_userdef.c +++ b/source/blender/blenloader/intern/versioning_userdef.c @@ -164,6 +164,10 @@ static void do_versions_theme(const UserDef *userdef, bTheme *btheme) FROM_DEFAULT_V4_UCHAR(space_view3d.face_front); } + if (!USER_VERSION_ATLEAST(283, 1)) { + FROM_DEFAULT_V4_UCHAR(space_view3d.bone_locked_weight); + } + /** * Versioning code until next subversion bump goes here. * |