From e2e487a877b87e0e5dd43d8198f4171b247162cd Mon Sep 17 00:00:00 2001 From: Gaia Clary Date: Thu, 27 Jun 2013 18:23:03 +0000 Subject: [PATCH] Fix: Check for locked Vertex Group (returned true where false was expected) --- source/blender/editors/object/object_vgroup.c | 8 ++++---- 1 file 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; }