diff options
author | Gaia Clary <gaia.clary@machinimatrix.org> | 2013-06-27 22:23:03 +0400 |
---|---|---|
committer | Gaia Clary <gaia.clary@machinimatrix.org> | 2013-06-27 22:23:03 +0400 |
commit | e2e487a877b87e0e5dd43d8198f4171b247162cd (patch) | |
tree | 556b7d8cc7d33c76df9b5ab5dc2ba6cc0296e736 /source/blender | |
parent | 73fcfd86512829a1b66370fb1470170b9bb0dbbd (diff) |
Fix: Check for locked Vertex Group (returned true where false was expected)
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/object/object_vgroup.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index 5106109b889..c2a352eaea8 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -4149,15 +4149,15 @@ static bool check_vertex_group_accessible(wmOperator *op, Object *ob, int def_nr if (!dg) { BKE_report(op->reports, RPT_ERROR, "Invalid Weight Group Index"); - return true; + return false; } if (dg->flag & DG_LOCK_WEIGHT) { BKE_report(op->reports, RPT_ERROR, "Weight Group is locked"); - return true; + return false; } - return false; + return true; } static int vertex_weight_paste_exec(bContext *C, wmOperator *op) @@ -4202,7 +4202,7 @@ static int vertex_weight_delete_exec(bContext *C, wmOperator *op) Object *ob = ED_object_context(C); const int def_nr = RNA_int_get(op->ptr, "weight_group"); - if (check_vertex_group_accessible(op, ob, def_nr)) { + if (!check_vertex_group_accessible(op, ob, def_nr)) { return OPERATOR_CANCELLED; } |