[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59216] branches/ soc-2013-meshdata_transfer/source/blender: shapekey transfer: rewiring the calls to use BM_mesh_data_copy, Vertex Group transfer: rewiring the calls to use BM_mesh_data_copy() and fixes to the BM_mesh_multi_layer_copy() for mistakenly unchanged variables

Walid Shouman eng.walidshouman at gmail.com
Sat Aug 17 18:16:02 CEST 2013


Revision: 59216
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59216
Author:   walid
Date:     2013-08-17 16:16:02 +0000 (Sat, 17 Aug 2013)
Log Message:
-----------
shapekey transfer: rewiring the calls to use BM_mesh_data_copy, Vertex Group transfer: rewiring the calls to use BM_mesh_data_copy() and fixes to the BM_mesh_multi_layer_copy() for mistakenly unchanged variables

Modified Paths:
--------------
    branches/soc-2013-meshdata_transfer/source/blender/bmesh/tools/bmesh_data_transfer.c
    branches/soc-2013-meshdata_transfer/source/blender/editors/object/object_shapekey.c
    branches/soc-2013-meshdata_transfer/source/blender/editors/object/object_vgroup.c

Modified: branches/soc-2013-meshdata_transfer/source/blender/bmesh/tools/bmesh_data_transfer.c
===================================================================
--- branches/soc-2013-meshdata_transfer/source/blender/bmesh/tools/bmesh_data_transfer.c	2013-08-17 16:09:24 UTC (rev 59215)
+++ branches/soc-2013-meshdata_transfer/source/blender/bmesh/tools/bmesh_data_transfer.c	2013-08-17 16:16:02 UTC (rev 59216)
@@ -2204,10 +2204,10 @@
 				b = 0;
 				BM_ITER_MESH (f_dst, &fiter, bm_dst, BM_FACES_OF_MESH) {
 
-					BM_ITER_ELEM (l, &liter, f_dst, BM_VERTS_OF_FACE) {
+					BM_ITER_ELEM (l, &liter, f_dst, BM_LOOPS_OF_FACE) {
 						float weight_accu;
 						//getting the weight holder (MDeformWeight)
-						dv_dst = BM_ELEM_CD_GET_VOID_P(v, cd_dvert_dst_offset);
+						dv_dst = BM_ELEM_CD_GET_VOID_P(l->v, cd_dvert_dst_offset);
 						dw_dst = defvert_verify_index(dv_dst, dst_grp_ind);	//use this to have a weight for the group assuming
 																			//the vert may haven't been assigned in advance
 						weight_accu = 0;

Modified: branches/soc-2013-meshdata_transfer/source/blender/editors/object/object_shapekey.c
===================================================================
--- branches/soc-2013-meshdata_transfer/source/blender/editors/object/object_shapekey.c	2013-08-17 16:09:24 UTC (rev 59215)
+++ branches/soc-2013-meshdata_transfer/source/blender/editors/object/object_shapekey.c	2013-08-17 16:16:02 UTC (rev 59216)
@@ -529,8 +529,8 @@
 
 	//*******copy based on ray casting
 	if (transfer_mode == ST_USE_NEAREST_FACE) {
-		if (!BM_mesh_shapekey_copy3(bm_src, bm_dst, replace_info, relative_to_target, tmp_mat)) {
-			return false;
+		if (!BM_mesh_data_copy(bm_src, bm_dst, CD_SHAPEKEY, replace_info, relative_to_target, tmp_mat)) {
+        return false;
 		}
 	}
 	//*******copy based on nearest vertex

Modified: branches/soc-2013-meshdata_transfer/source/blender/editors/object/object_vgroup.c
===================================================================
--- branches/soc-2013-meshdata_transfer/source/blender/editors/object/object_vgroup.c	2013-08-17 16:09:24 UTC (rev 59215)
+++ branches/soc-2013-meshdata_transfer/source/blender/editors/object/object_vgroup.c	2013-08-17 16:16:02 UTC (rev 59216)
@@ -390,7 +390,7 @@
 	BM_mesh_bm_from_me(bm_dst, me_dst, TRUE, true, 0);
 
 	if (transfer_mode == PROJECTION_TRANSFER) {
-		if (!BM_mesh_vertex_group_copy(bm_src, bm_dst, replace_info, relative_to_target, tmp_mat)) {
+		if (!BM_mesh_data_copy(bm_src, bm_dst, CD_MDEFORMVERT, replace_info, relative_to_target, tmp_mat)) {
 			return false;
 		}
 	}




More information about the Bf-blender-cvs mailing list