[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47257] branches/soc-2012-bratwurst/source /blender/editors/transform/transform_generics.c: UV transforc correction tool
Antony Riakiotakis
kalast at gmail.com
Thu May 31 10:38:15 CEST 2012
Revision: 47257
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47257
Author: psy-fi
Date: 2012-05-31 08:38:14 +0000 (Thu, 31 May 2012)
Log Message:
-----------
UV transforc correction tool
============================
* Next set of corrections that makes multiple selection + transform much
more robust. Calcualate final edge length based on initial position of
vertex on the other side of the loop.
Modified Paths:
--------------
branches/soc-2012-bratwurst/source/blender/editors/transform/transform_generics.c
Modified: branches/soc-2012-bratwurst/source/blender/editors/transform/transform_generics.c
===================================================================
--- branches/soc-2012-bratwurst/source/blender/editors/transform/transform_generics.c 2012-05-31 08:24:53 UTC (rev 47256)
+++ branches/soc-2012-bratwurst/source/blender/editors/transform/transform_generics.c 2012-05-31 08:38:14 UTC (rev 47257)
@@ -1710,22 +1710,29 @@
if(index_next == -1) {
/* get BMvert coords since the vertex hasn't changed */
sub_v3_v3v3(edge_vec_init, l_next->v->co, td[i].iloc);
+ sub_v3_v3v3(edge_vec_final, l_next->v->co, v->co);
sub_v2_v2v2(edge_uv_init, luv_next->uv, uvtc->initial_uvs[BM_elem_index_get(v)]->init_uv);
} else {
sub_v3_v3v3(edge_vec_init, td[index_next].iloc, td[i].iloc);
+ sub_v3_v3v3(edge_vec_final, td[index_next].iloc, v->co);
sub_v2_v2v2(edge_uv_init, uvtc->initial_uvs[BM_elem_index_get(l_next->v)]->init_uv, uvtc->initial_uvs[BM_elem_index_get(v)]->init_uv);
}
if(index_prev == -1) {
/* get BMvert coords since the vertex hasn't changed */
sub_v3_v3v3(edge_vec_init2, l_prev->v->co, td[i].iloc);
+ sub_v3_v3v3(edge_vec_final2, l_prev->v->co, v->co);
sub_v2_v2v2(edge_uv_init2, luv_prev->uv, uvtc->initial_uvs[BM_elem_index_get(v)]->init_uv);
} else {
sub_v3_v3v3(edge_vec_init2, td[index_prev].iloc, td[i].iloc);
+ sub_v3_v3v3(edge_vec_final2, td[index_prev].iloc, v->co);
sub_v2_v2v2(edge_uv_init2, uvtc->initial_uvs[BM_elem_index_get(l_prev->v)]->init_uv, uvtc->initial_uvs[BM_elem_index_get(v)]->init_uv);
}
- sub_v3_v3v3(edge_vec_final, l_next->v->co, v->co);
- sub_v3_v3v3(edge_vec_final2, l_prev->v->co, v->co);
+ //sub_v3_v3v3(edge_vec_final, l_next->v->co, v->co);
+ //sub_v3_v3v3(edge_vec_final2, l_prev->v->co, v->co);
+ //sub_v3_v3v3(edge_vec_final, l_next->v->co, v->co);
+ //sub_v3_v3v3(edge_vec_final2, l_prev->v->co, v->co);
+
/* first project final edges to initial edges to get the translation along the edge axis */
project_v3_v3v3(edge_vec_final, edge_vec_final, edge_vec_init);
project_v3_v3v3(edge_vec_final2, edge_vec_final2, edge_vec_init2);
More information about the Bf-blender-cvs
mailing list