diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2012-01-17 20:31:13 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2012-01-17 20:31:13 +0400 |
commit | a8081c1d2bb9115833493b011bb93d6c08112b2d (patch) | |
tree | 4383d080b80786257b291068e48a06bdb0ef5bd6 /source/blender/editors/uvedit/uvedit_parametrizer.c | |
parent | fcc54520d1f029b86cb8c6f43c239ef81090a99a (diff) |
Uv Tools branch GSOC 2011
=========================
Documentation: http://wiki.blender.org/index.php/User:Psy-Fi/UV_Tools
Major features include:
*16 bit image support in viewport
*Subsurf aware unwrapping
*Smart Stitch(snap/rotate islands, preview, middlepoint/endpoint stitching)
*Seams from islands tool (marks seams and sharp, depending on settings)
*Uv Sculpting(Grab/Pinch/Rotate)
All tools are complete apart from stitching that is considered stable but with an extra edge mode under development(will be in soc-2011-onion-uv-tools).
Diffstat (limited to 'source/blender/editors/uvedit/uvedit_parametrizer.c')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_parametrizer.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c index 7ad573231c9..d651a17b624 100644 --- a/source/blender/editors/uvedit/uvedit_parametrizer.c +++ b/source/blender/editors/uvedit/uvedit_parametrizer.c @@ -91,7 +91,7 @@ typedef struct PVert { } u; struct PEdge *edge; - float *co; + float co[3]; float uv[2]; unsigned char flag; @@ -655,11 +655,15 @@ static void p_face_backup_uvs(PFace *f) { PEdge *e1 = f->edge, *e2 = e1->next, *e3 = e2->next; - if (e1->orig_uv && e2->orig_uv && e3->orig_uv) { + if (e1->orig_uv) { e1->old_uv[0] = e1->orig_uv[0]; e1->old_uv[1] = e1->orig_uv[1]; + } + if (e2->orig_uv) { e2->old_uv[0] = e2->orig_uv[0]; e2->old_uv[1] = e2->orig_uv[1]; + } + if (e3->orig_uv) { e3->old_uv[0] = e3->orig_uv[0]; e3->old_uv[1] = e3->orig_uv[1]; } @@ -669,11 +673,15 @@ static void p_face_restore_uvs(PFace *f) { PEdge *e1 = f->edge, *e2 = e1->next, *e3 = e2->next; - if (e1->orig_uv && e2->orig_uv && e3->orig_uv) { + if (e1->orig_uv) { e1->orig_uv[0] = e1->old_uv[0]; e1->orig_uv[1] = e1->old_uv[1]; + } + if (e2->orig_uv) { e2->orig_uv[0] = e2->old_uv[0]; e2->orig_uv[1] = e2->old_uv[1]; + } + if (e3->orig_uv) { e3->orig_uv[0] = e3->old_uv[0]; e3->orig_uv[1] = e3->old_uv[1]; } @@ -684,7 +692,7 @@ static void p_face_restore_uvs(PFace *f) static PVert *p_vert_add(PHandle *handle, PHashKey key, float *co, PEdge *e) { PVert *v = (PVert*)BLI_memarena_alloc(handle->arena, sizeof *v); - v->co = co; + copy_v3_v3(v->co, co); v->u.key = key; v->edge = e; v->flag = 0; @@ -708,7 +716,7 @@ static PVert *p_vert_copy(PChart *chart, PVert *v) { PVert *nv = (PVert*)BLI_memarena_alloc(chart->handle->arena, sizeof *nv); - nv->co = v->co; + copy_v3_v3(nv->co, v->co); nv->uv[0] = v->uv[0]; nv->uv[1] = v->uv[1]; nv->u.key = v->u.key; |