[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [57833] trunk/blender/source/blender/ editors/object/object_vgroup.c: Fix: Check for locked Vertex Group ( returned true where false was expected)

Gaia Clary gaia.clary at machinimatrix.org
Thu Jun 27 20:23:03 CEST 2013


Revision: 57833
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57833
Author:   gaiaclary
Date:     2013-06-27 18:23:03 +0000 (Thu, 27 Jun 2013)
Log Message:
-----------
Fix: Check for locked Vertex Group (returned true where false was expected)

Modified Paths:
--------------
    trunk/blender/source/blender/editors/object/object_vgroup.c

Modified: trunk/blender/source/blender/editors/object/object_vgroup.c
===================================================================
--- trunk/blender/source/blender/editors/object/object_vgroup.c	2013-06-27 18:20:47 UTC (rev 57832)
+++ trunk/blender/source/blender/editors/object/object_vgroup.c	2013-06-27 18:23:03 UTC (rev 57833)
@@ -4149,15 +4149,15 @@
 
 	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 @@
 	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;
 	}
 




More information about the Bf-blender-cvs mailing list