diff options
-rw-r--r-- | source/blender/editors/object/object_vgroup.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index 9ad36cacc7d..88b27bd4cea 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -693,7 +693,7 @@ static const EnumPropertyItem WT_vertex_group_select_item[] = { const EnumPropertyItem *ED_object_vgroup_selection_itemf_helper(const bContext *C, PointerRNA *UNUSED(ptr), - PropertyRNA *UNUSED(prop), + PropertyRNA *prop, bool *r_free, const uint selection_mask) { @@ -731,6 +731,10 @@ const EnumPropertyItem *ED_object_vgroup_selection_itemf_helper(const bContext * RNA_enum_items_add_value(&item, &totitem, WT_vertex_group_select_item, WT_VGROUP_ALL); } + /* Set `Deform Bone` as default selection if armature is present. */ + RNA_def_property_enum_default( + prop, BKE_modifiers_is_deformed_by_armature(ob) ? WT_VGROUP_BONE_DEFORM : WT_VGROUP_ALL); + RNA_enum_item_end(&item, &totitem); *r_free = true; |