diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2007-01-02 23:33:11 +0300 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2007-01-02 23:33:11 +0300 |
commit | d813fb3da811d391b6b568fb077b2f3e538ce4db (patch) | |
tree | 7132de3f0750afb10180782957093fc74e586ec2 /source | |
parent | 09014382151d518d724e86944829efa7f2c3f308 (diff) |
Added undo push for retopo all.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/include/BIF_retopo.h | 3 | ||||
-rw-r--r-- | source/blender/src/buttons_editing.c | 4 | ||||
-rw-r--r-- | source/blender/src/editcurve.c | 2 | ||||
-rw-r--r-- | source/blender/src/editmesh_add.c | 2 | ||||
-rw-r--r-- | source/blender/src/retopo.c | 8 | ||||
-rwxr-xr-x | source/blender/src/transform_generics.c | 4 |
6 files changed, 15 insertions, 8 deletions
diff --git a/source/blender/include/BIF_retopo.h b/source/blender/include/BIF_retopo.h index f304b554500..8a071f704c2 100644 --- a/source/blender/include/BIF_retopo.h +++ b/source/blender/include/BIF_retopo.h @@ -98,7 +98,8 @@ RetopoPaintData *retopo_paint_data_copy(RetopoPaintData *rpd); void retopo_toggle(void*,void*); void retopo_do_vert(struct View3D *v3d, float *v); -void retopo_do_all(void*,void*); +void retopo_do_all(); +void retopo_do_all_cb(void *, void *); void retopo_queue_updates(struct View3D *v3d); void retopo_matrix_update(struct View3D *v3d); diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c index 92535f4635e..2949a393d81 100644 --- a/source/blender/src/buttons_editing.c +++ b/source/blender/src/buttons_editing.c @@ -795,7 +795,7 @@ static void editing_panel_mesh_type(Object *ob, Mesh *me) but= uiDefButBitC(block,TOG,2,B_NOP,"Paint", 10,110,55,19, &G.editMesh->retopo_mode,0,0,0,0, ""); uiButSetFunc(but,retopo_paint_toggle,ob,me); but= uiDefBut(block,BUT,B_NOP,"Retopo All", 65,110,115,19, 0,0,0,0,0, "Apply the re-topology tool to all selected vertices"); - uiButSetFunc(but,retopo_do_all,ob,me); + uiButSetFunc(but,retopo_do_all_cb,ob,me); } uiBlockEndAlign(block); } @@ -2677,7 +2677,7 @@ static void editing_panel_curve_tools1(Object *ob, Curve *cu) uiButSetFunc(but,retopo_toggle,0,0); if(cu->flag & CU_RETOPO) { but= uiDefBut(block,BUT,B_NOP,"Retopo All", 560,160,100,19, 0,0,0,0,0, "Apply the re-topology tool to all selected vertices"); - uiButSetFunc(but,retopo_do_all,0,0); + uiButSetFunc(but,retopo_do_all_cb,0,0); } } } diff --git a/source/blender/src/editcurve.c b/source/blender/src/editcurve.c index 39f61ac94be..13c8ace15d5 100644 --- a/source/blender/src/editcurve.c +++ b/source/blender/src/editcurve.c @@ -2671,7 +2671,7 @@ void addvert_Nurb(int mode) } } - retopo_do_all(0,0); + retopo_do_all(); test2DNurb(nu); DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA); diff --git a/source/blender/src/editmesh_add.c b/source/blender/src/editmesh_add.c index dbd10dd71e4..596f839c1a4 100644 --- a/source/blender/src/editmesh_add.c +++ b/source/blender/src/editmesh_add.c @@ -242,7 +242,7 @@ void add_click_mesh(void) eve->f= SELECT; } - retopo_do_all(NULL, NULL); + retopo_do_all(); countall(); diff --git a/source/blender/src/retopo.c b/source/blender/src/retopo.c index 5b613880fb5..fea9b191690 100644 --- a/source/blender/src/retopo.c +++ b/source/blender/src/retopo.c @@ -758,7 +758,7 @@ void retopo_do_vert(View3D *v3d, float *v) retopo_do_2d(v3d,proj,v,0); } -void retopo_do_all(void *j1,void *j2) +void retopo_do_all() { RetopoViewData *rvd= G.vd->retopo_view_data; if(retopo_mesh_check()) { @@ -802,6 +802,12 @@ void retopo_do_all(void *j1,void *j2) } } +void retopo_do_all_cb(void *j1, void *j2) +{ + retopo_do_all(); + BIF_undo_push("Retopo all"); +} + void retopo_queue_updates(View3D *v3d) { if(retopo_mesh_check() || retopo_curve_check()) { diff --git a/source/blender/src/transform_generics.c b/source/blender/src/transform_generics.c index bdb2075b65c..c8f81a61177 100755 --- a/source/blender/src/transform_generics.c +++ b/source/blender/src/transform_generics.c @@ -227,7 +227,7 @@ void recalcData(TransInfo *t) if(G.scene->toolsettings->editbutflag & B_MESH_X_MIRROR) editmesh_apply_to_mirror(t); - retopo_do_all(0,G.obedit->data); + retopo_do_all(); DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA); /* sets recalc flags */ @@ -243,7 +243,7 @@ void recalcData(TransInfo *t) nu= nu->next; } - retopo_do_all(NULL,NULL); + retopo_do_all(); } else if(G.obedit->type==OB_ARMATURE){ /* no recalc flag, does pose */ bArmature *arm= G.obedit->data; |