diff options
author | Matt Ebb <matt@mke3.net> | 2005-11-22 18:00:32 +0300 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2005-11-22 18:00:32 +0300 |
commit | 3cd17c637a380576a72ba282de5715a5b46bd56a (patch) | |
tree | 5dcedc00487eac5476c4ff2d0714dce1cd809b82 /source/blender/src/unwrapper.c | |
parent | af2042d2197abdddd9749c49dee7e6d364d41cc9 (diff) |
* LSCM live transform is finally here!
This is a combined effort from Jens, Ton who finished the code here on my machine, and myself putting in the little menu toggle and committing :).
Turn it on and off in the UV/Image window menu UVs -> LSCM Live Transform. It recalculates the LSCM within the transform loop when you're transforming pinned vertices, so it gives realtime feedback - a real time saver! Note: this is much more powerful than proportional edit, since it's properly calculating LSCM using the correct edge angles, etc.
I recorded a quicky demo video here: http://orange.blender.org/wp-content/themes/orange/images/media/lscm_live.mov (quicktime animation codec)
Diffstat (limited to 'source/blender/src/unwrapper.c')
-rw-r--r-- | source/blender/src/unwrapper.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/source/blender/src/unwrapper.c b/source/blender/src/unwrapper.c index c1bf0d3fa3f..045eea31625 100644 --- a/source/blender/src/unwrapper.c +++ b/source/blender/src/unwrapper.c @@ -1164,6 +1164,38 @@ void unwrap_lscm(void) allqueue(REDRAWIMAGE, 0); } +/* note; to make it quick work, brecht/jens: you can make it nice later! (ton) */ +void unwrap_lscm_live(void) +{ + int dopack = 1; + int res; + Mesh *me; + int totgroup, *groups=NULL, a; + + me= get_mesh(OBACT); + if(me==0 || me->tface==0) return; + + totgroup= make_seam_groups(me, &groups); + + if(totgroup==0) return; + + for(a=totgroup; a>0; a--) { + res= unwrap_lscm_face_group(me, groups, a); + if((res < 3) && (res > -1)) { + seam_group_normalize(me, groups, a); + } + else { + dopack = 0; + } + + } + + if(dopack) pack_seam_groups(me, groups, totgroup); + + MEM_freeN(groups); + +} + /* Set tface seams based on edge data, uses hash table to find seam edges. */ void set_seamtface() |