[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59453] branches/ soc-2013-meshdata_transfer/source/blender/bmesh/tools/bmesh_data_transfer.c : code rewrite: supporting data copy by index fix: -fixing the pointers after the memory allocation instead of before it-

Walid Shouman eng.walidshouman at gmail.com
Sat Aug 24 07:22:14 CEST 2013


Revision: 59453
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59453
Author:   walid
Date:     2013-08-24 05:22:13 +0000 (Sat, 24 Aug 2013)
Log Message:
-----------
code rewrite: supporting data copy by index fix: -fixing the pointers after the memory allocation instead of before it-

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-24 04:39:56 UTC (rev 59452)
+++ branches/soc-2013-meshdata_transfer/source/blender/bmesh/tools/bmesh_data_transfer.c	2013-08-24 05:22:13 UTC (rev 59453)
@@ -3539,16 +3539,15 @@
 		     f_dst = BM_iter_step(&fiter), f_src = BM_iter_step(&fiter)) {
 
 			int index = f_dst->head.index;
-			BMLoop **l_src_grp = f_match_table[index].l_src;
-			BMLoop **l_dst_grp = f_match_table[index].l_dst;
 			int l_num = f_dst->len;
+			BMLoop **l_src_grp = MEM_mallocN(l_num, "l_src_grp bmesh_data_transfer.c");
+			BMLoop **l_dst_grp = MEM_mallocN(l_num, "l_dst_grp bmesh_data_transfer.c");
 
 			f_match_table[index].f_dst = f_dst;
 			f_match_table[index].f_src = f_src;
+			f_match_table[index].l_src = l_src_grp;
+			f_match_table[index].l_src = l_dst_grp;
 
-			l_src_grp = MEM_mallocN(l_num, "l_src_grp bmesh_data_transfer.c");
-			l_dst_grp = MEM_mallocN(l_num, "l_dst_grp bmesh_data_transfer.c");
-
 			if (!BM_match_loops(f_src, f_dst, l_src_grp, l_dst_grp))
 				return false;
 		}




More information about the Bf-blender-cvs mailing list