[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47481] branches/meshdata_transfer/source/ blender/editors/object/object_vgroup.c: Removed confusing error reporting code.

Ove Murberg Henriksen sorayasilvermoon at hotmail.com
Tue Jun 5 23:10:26 CEST 2012


Revision: 47481
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47481
Author:   cyborgmuppet
Date:     2012-06-05 21:10:15 +0000 (Tue, 05 Jun 2012)
Log Message:
-----------
Removed confusing error reporting code.
The confusing part was inconsitent reporting. 
It reported un eaven indices when only one source and a fail,
but not when several sources and some success and some fail.

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

Modified: branches/meshdata_transfer/source/blender/editors/object/object_vgroup.c
===================================================================
--- branches/meshdata_transfer/source/blender/editors/object/object_vgroup.c	2012-06-05 20:48:01 UTC (rev 47480)
+++ branches/meshdata_transfer/source/blender/editors/object/object_vgroup.c	2012-06-05 21:10:15 UTC (rev 47481)
@@ -3030,8 +3030,6 @@
 {
 	Scene *scene = CTX_data_scene(C);
 	Object *ob_act = CTX_data_active_object(C);
-	int change = 0;
-	int fail = 0;
 	bDeformGroup *dg_src;
 
 	VertexGroupOption vertex_group_option = RNA_enum_get(op->ptr, "VertexGroupOption");
@@ -3046,20 +3044,16 @@
 			switch (vertex_group_option) {
 
 				case REPLACE_SINGLE_VERTEX_GROUP:
-					if (ED_vgroup_transfer_weight(ob_act, ob_slc,
-												  BLI_findlink(&ob_slc->defbase, ob_slc->actdef - 1), scene, method_option, replace_option)) change++;
-					else fail++;
+					ED_vgroup_transfer_weight(ob_act, ob_slc, BLI_findlink(&ob_slc->defbase, ob_slc->actdef - 1), scene, method_option, replace_option);
 					break;
 
 				case REPLACE_ALL_VERTEX_GROUPS:
 					for (dg_src = ob_slc->defbase.first; dg_src; dg_src = dg_src->next) {
-						if (ED_vgroup_transfer_weight(ob_act, ob_slc, dg_src, scene, method_option, replace_option)) change++;
-						else fail++;
+						ED_vgroup_transfer_weight(ob_act, ob_slc, dg_src, scene, method_option, replace_option);
 					}
 					break;
 			}
 		}
-		else change++;
 	}
 
 	/* Event notifiers for correct display of data */
@@ -3069,12 +3063,6 @@
 
 	CTX_DATA_END;
 
-	/* Report error when task can not be completed with available functions. */
-	if ((change == 0 && fail == 0) || fail) {
-		BKE_reportf(op->reports, RPT_ERROR,
-		            "Copy to VGroups to Selected warning done %d, failed %d, object data must have matching indices",
-		            change, fail);
-	}
 	return OPERATOR_FINISHED;
 }
 




More information about the Bf-blender-cvs mailing list