diff options
author | Colin Basnett <cmbasnett@gmail.com> | 2022-10-08 21:43:38 +0300 |
---|---|---|
committer | Colin Basnett <cmbasnett@gmail.com> | 2022-10-08 21:43:38 +0300 |
commit | cee6c07f9ee85ac68d0479638af832e4fc97c49f (patch) | |
tree | 50f202ac784986fb509ddd5a798e39bf035aa5ad /source/blender | |
parent | f61ff22967c5f3be2d5f661ce2d455e3e9d39f0a (diff) |
Set operator poll message when vertex group is locked
Differential Revision: https://developer.blender.org/D16190
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/object/object_vgroup.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/object/object_vgroup.cc b/source/blender/editors/object/object_vgroup.cc index 02a247dd15e..a63e06d6866 100644 --- a/source/blender/editors/object/object_vgroup.cc +++ b/source/blender/editors/object/object_vgroup.cc @@ -2850,8 +2850,9 @@ static bool vertex_group_vert_select_unlocked_poll(bContext *C) if (def_nr != 0) { const ListBase *defbase = BKE_object_defgroup_list(ob); const bDeformGroup *dg = static_cast<const bDeformGroup *>(BLI_findlink(defbase, def_nr - 1)); - if (dg) { - return !(dg->flag & DG_LOCK_WEIGHT); + if (dg && (dg->flag & DG_LOCK_WEIGHT)) { + CTX_wm_operator_poll_msg_set(C, "The active vertex group is locked"); + return false; } } return true; |