diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2007-03-22 23:32:20 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2007-03-22 23:32:20 +0300 |
commit | 5219812f55ce37a2bd0cb6461084963019e013b6 (patch) | |
tree | 190b9f6382dde48c0f23a28ec4d576ff47d4dcc0 /source/blender/src/unwrapper.c | |
parent | 8aafed560a71a76c1c784bda3f8851725c9ec10b (diff) |
Added "Pack Charts" function in the UV editor, using Campbell's new box
packing code.
Diffstat (limited to 'source/blender/src/unwrapper.c')
-rw-r--r-- | source/blender/src/unwrapper.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/source/blender/src/unwrapper.c b/source/blender/src/unwrapper.c index b0716b81b91..3b6d3eaf91a 100644 --- a/source/blender/src/unwrapper.c +++ b/source/blender/src/unwrapper.c @@ -398,6 +398,27 @@ void minimize_stretch_tface_uv(void) allqueue(REDRAWIMAGE, 0); } +void pack_charts_tface_uv(void) +{ + Mesh *me; + ParamHandle *handle; + + me = get_mesh(OBACT); + if(me==0 || me->mtface==0) return; + + handle = construct_param_handle(me, 1, 0, 1); + param_pack(handle); + param_flush(handle); + param_delete(handle); + + BIF_undo_push("UV pack charts"); + + object_uvs_changed(OBACT); + + allqueue(REDRAWVIEW3D, 0); + allqueue(REDRAWIMAGE, 0); +} + /* LSCM live mode */ static ParamHandle *liveHandle = NULL; |