Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaia Clary <gaia.clary@machinimatrix.org>2013-06-05 02:30:41 +0400
committerGaia Clary <gaia.clary@machinimatrix.org>2013-06-05 02:30:41 +0400
commit6d9fcdf9830e26b1d5c7e5dda5d86229126599e9 (patch)
tree85e944c9e02a6e27e1d23151732694b711ef7cf6 /source/blender/editors
parent2230794e7347229e462ee8f8c57d6fd0330ee695 (diff)
Added 'clear active group' to object data properties -> Vertex Groups -> pulldown menu
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/object/object_vgroup.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c
index 9a6cc7e4340..b3c8b1f720b 100644
--- a/source/blender/editors/object/object_vgroup.c
+++ b/source/blender/editors/object/object_vgroup.c
@@ -2850,9 +2850,12 @@ void OBJECT_OT_vertex_group_assign(wmOperatorType *ot)
static int vertex_group_remove_from_exec(bContext *C, wmOperator *op)
{
+ const bool use_all_groups = RNA_boolean_get(op->ptr, "use_all_groups");
+ const bool use_all_verts = RNA_boolean_get(op->ptr, "use_all_verts");
+
Object *ob = ED_object_context(C);
- if (RNA_boolean_get(op->ptr, "all")) {
+ if (use_all_groups) {
if (vgroup_remove_verts(ob, 0) == false) {
return OPERATOR_CANCELLED;
}
@@ -2860,7 +2863,7 @@ static int vertex_group_remove_from_exec(bContext *C, wmOperator *op)
else {
bDeformGroup *dg = BLI_findlink(&ob->defbase, ob->actdef - 1);
- if ((dg == NULL) || (vgroup_active_remove_verts(ob, false, dg) == false)) {
+ if ((dg == NULL) || (vgroup_active_remove_verts(ob, use_all_verts, dg) == false)) {
return OPERATOR_CANCELLED;
}
}
@@ -2873,6 +2876,7 @@ static int vertex_group_remove_from_exec(bContext *C, wmOperator *op)
void OBJECT_OT_vertex_group_remove_from(wmOperatorType *ot)
{
+ PropertyRNA *prop;
/* identifiers */
ot->name = "Remove from Vertex Group";
ot->idname = "OBJECT_OT_vertex_group_remove_from";
@@ -2889,7 +2893,10 @@ void OBJECT_OT_vertex_group_remove_from(wmOperatorType *ot)
ot->flag = /*OPTYPE_REGISTER|*/ OPTYPE_UNDO;
/* properties */
- RNA_def_boolean(ot->srna, "all", 0, "All", "Remove from all vertex groups");
+ prop = RNA_def_boolean(ot->srna, "use_all_groups", 0, "All Groups", "Remove from all Groups");
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
+ prop = RNA_def_boolean(ot->srna, "use_all_verts", 0, "All verts", "Clear Active Group");
+ RNA_def_property_flag(prop, PROP_SKIP_SAVE);
}
static int vertex_group_select_exec(bContext *C, wmOperator *UNUSED(op))