From 88534ee519f9e712839a876bb0b13165ec83904a Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sun, 7 Nov 2004 13:15:04 +0000 Subject: Added some missing undo pushes for the UV editor and UV Face Select Mode. --- source/blender/src/editface.c | 19 +++++++++---------- source/blender/src/editmesh_mods.c | 2 ++ source/blender/src/unwrapper.c | 6 +++++- source/blender/src/vpaint.c | 2 ++ 4 files changed, 18 insertions(+), 11 deletions(-) (limited to 'source') diff --git a/source/blender/src/editface.c b/source/blender/src/editface.c index 868257e3c83..16c44f5259f 100644 --- a/source/blender/src/editface.c +++ b/source/blender/src/editface.c @@ -467,7 +467,7 @@ void calculate_uv_map(unsigned short mapmode) tface= me->tface; mface= me->mface; for(a=0; atotface; a++, mface++, tface++) { - if(!(tface->flag & TF_SELECT && mface->v3)) return; + if(!(tface->flag & TF_SELECT && mface->v3)) continue; dx= dy= 0; if(mface->v4) b= 3; else b= 2; @@ -489,6 +489,8 @@ void calculate_uv_map(unsigned short mapmode) } } + BIF_undo_push("UV calculation"); + allqueue(REDRAWVIEW3D, 0); allqueue(REDRAWIMAGE, 0); } @@ -608,13 +610,12 @@ void reveal_tface() tface++; } - BIF_undo_push("Reveil UV face"); + BIF_undo_push("Reveal UV face"); + allqueue(REDRAWVIEW3D, 0); allqueue(REDRAWIMAGE, 0); } - - void hide_tface() { Mesh *me; @@ -774,7 +775,7 @@ void selectswap_tface(void) tface++; } - BIF_undo_push("Select swap UV face"); + BIF_undo_push("Select inverse UV face"); allqueue(REDRAWVIEW3D, 0); allqueue(REDRAWIMAGE, 0); } @@ -1003,6 +1004,9 @@ void face_borderselect() MEM_freeN(rectm); MEM_freeN(selar); + + BIF_undo_push("Border Select UV face"); + allqueue(REDRAWVIEW3D, 0); allqueue(REDRAWIMAGE, 0); } @@ -1099,9 +1103,6 @@ void uv_autocalc_tface() case UV_LSCM_MAPPING: unwrap_lscm(); break; } - - if(mode>0) BIF_undo_push("UV calculation"); - } void set_faceselect() /* toggle */ @@ -1616,8 +1617,6 @@ void get_same_uv(void) tface++; } - - /* image window redraw */ BIF_undo_push("Get same UV"); allqueue(REDRAWIMAGE, 0); diff --git a/source/blender/src/editmesh_mods.c b/source/blender/src/editmesh_mods.c index 2bd8880ef18..bfe4b7b652d 100644 --- a/source/blender/src/editmesh_mods.c +++ b/source/blender/src/editmesh_mods.c @@ -1692,6 +1692,7 @@ void editmesh_mark_seam(int clear) } eed= eed->next; } + BIF_undo_push("Mark Seam"); } else { eed= em->edges.first; @@ -1701,6 +1702,7 @@ void editmesh_mark_seam(int clear) } eed= eed->next; } + BIF_undo_push("Clear Seam"); } allqueue(REDRAWVIEW3D, 0); diff --git a/source/blender/src/unwrapper.c b/source/blender/src/unwrapper.c index 68ef7cca919..d35bf024edc 100644 --- a/source/blender/src/unwrapper.c +++ b/source/blender/src/unwrapper.c @@ -1276,7 +1276,9 @@ void unwrap_lscm(void) if(dopack) pack_seam_groups(me, groups, totgroup); MEM_freeN(groups); - + + BIF_undo_push("UV lscm unwrap"); + allqueue(REDRAWVIEW3D, 0); allqueue(REDRAWIMAGE, 0); } @@ -1401,6 +1403,8 @@ void select_linked_tfaces_with_seams() } free_hash_edge_table(htable); + BIF_undo_push("Select linked UV face"); + allqueue(REDRAWVIEW3D, 0); allqueue(REDRAWIMAGE, 0); } diff --git a/source/blender/src/vpaint.c b/source/blender/src/vpaint.c index f24d5e6f1c6..c7faa53c200 100644 --- a/source/blender/src/vpaint.c +++ b/source/blender/src/vpaint.c @@ -342,6 +342,7 @@ void clear_vpaint() *to= paintcol; to++; } + BIF_undo_push("Clear vertex colors"); allqueue(REDRAWVIEW3D, 0); if(me->tface) mcol_to_tface(me, 1); } @@ -372,6 +373,7 @@ void clear_vpaint_selectedfaces() tf[i].col[3] = paintcol; } } + BIF_undo_push("Clear vertex colors"); allqueue(REDRAWVIEW3D, 0); } -- cgit v1.2.3