Revision: 59541 http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59541 Author: walid Date: 2013-08-26 22:18:34 +0000 (Mon, 26 Aug 2013) Log Message: ----------- code rewrite: combining the CD_Shapekeys and CD_MDeformVert to be computed using the same calls WIP
Modified Paths: -------------- branches/soc-2013-meshdata_transfer/source/blender/bmesh/tools/bmesh_data_transfer.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-26 22:03:38 UTC (rev 59540) +++ branches/soc-2013-meshdata_transfer/source/blender/bmesh/tools/bmesh_data_transfer.c 2013-08-26 22:18:34 UTC (rev 59541) @@ -390,34 +390,9 @@ BMElem *ele_src = array_src[i]; BMElem *ele_dst = array_dst[i]; - switch (layer_type) { - case CD_SHAPEKEY: - { - ptr = CustomData_bmesh_get(cd_src, ele_src->head.data, CD_SHAPEKEY); - CustomData_bmesh_set(cd_src, ele_src->head.data, CD_SHAPEKEY, ptr); + ptr = CustomData_bmesh_get(cd_src, ele_src->head.data, layer_type); + CustomData_bmesh_set(cd_dst, ele_dst->head.data, layer_type, ptr); - ptr = CustomData_bmesh_get(cd_dst, ele_dst->head.data, CD_SHAPEKEY); - CustomData_bmesh_set(cd_dst, ele_dst->head.data, CD_SHAPEKEY, ptr); - - CustomData_bmesh_copy_data(cd_src, cd_dst, ele_src->head.data, &ele_dst->head.data); - - break; - } - - case CD_MDEFORMVERT: - { - - ptr = CustomData_bmesh_get(cd_src, ele_src->head.data, CD_MDEFORMVERT); - CustomData_bmesh_set(cd_src, ele_src->head.data, CD_MDEFORMVERT, ptr); - - ptr = CustomData_bmesh_get(cd_dst, ele_dst->head.data, CD_MDEFORMVERT); - CustomData_bmesh_set(cd_dst, ele_dst->head.data, CD_MDEFORMVERT, ptr); - - CustomData_bmesh_copy_data(cd_src, cd_dst, ele_src->head.data, &ele_dst->head.data); - - break; - } - } } } } _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs