[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58653] branches/ soc-2013-meshdata_transfer/source/blender/bmesh/tools/bmesh_data_transfer.c : UV transfer through faces: simple fix for the interpolation to work for single islands
Walid Shouman
eng.walidshouman at gmail.com
Sat Jul 27 10:04:46 CEST 2013
Revision: 58653
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58653
Author: walid
Date: 2013-07-27 08:04:46 +0000 (Sat, 27 Jul 2013)
Log Message:
-----------
UV transfer through faces: simple fix for the interpolation to work for single islands
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-07-27 07:02:27 UTC (rev 58652)
+++ branches/soc-2013-meshdata_transfer/source/blender/bmesh/tools/bmesh_data_transfer.c 2013-07-27 08:04:46 UTC (rev 58653)
@@ -1151,13 +1151,12 @@
tmp_weight = MEM_mallocN(sizeof(*tmp_weight) * v_count, "tmp_weight bmesh_data_transfer.c");
//spatially finding the weights from the face's vertices
- interp_weights_poly_v3(tmp_weight, v_co_list, v_count, v_co);
+ interp_weights_poly_v3(tmp_weight, v_co_list, v_count, tmp_co);
// Interpolating according to the spatially found weights
zero_v2(weight_accu);
- BM_ITER_ELEM_INDEX (v2, &fiter, f, BM_VERTS_OF_FACE, a) {
- //within a single island, all the vert's loops have the same value
- l = BM_vert_find_first_loop(v2);
+ //we need to ensure the first loop match with the first vertex!
+ BM_ITER_ELEM_INDEX (l, &liter, f, BM_LOOPS_OF_FACE, a) {
madd_v2_v2fl(weight_accu, BM_ELEM_CD_GET_VOID_P(l, CD_src), tmp_weight[a]);
}
More information about the Bf-blender-cvs
mailing list