diff options
-rw-r--r-- | source/blender/include/BDR_editobject.h | 8 | ||||
-rw-r--r-- | source/blender/python/api2_2x/Blender.c | 2 | ||||
-rw-r--r-- | source/blender/python/api2_2x/NMesh.c | 4 | ||||
-rw-r--r-- | source/blender/python/api2_2x/Object.c | 2 | ||||
-rw-r--r-- | source/blender/python/api2_2x/Window.c | 4 | ||||
-rw-r--r-- | source/blender/src/drawscene.c | 2 | ||||
-rw-r--r-- | source/blender/src/editarmature.c | 4 | ||||
-rw-r--r-- | source/blender/src/editcurve.c | 4 | ||||
-rw-r--r-- | source/blender/src/editfont.c | 6 | ||||
-rw-r--r-- | source/blender/src/editmesh.c | 4 | ||||
-rw-r--r-- | source/blender/src/editobject.c | 38 | ||||
-rw-r--r-- | source/blender/src/header_info.c | 2 | ||||
-rw-r--r-- | source/blender/src/header_view3d.c | 16 | ||||
-rw-r--r-- | source/blender/src/meshtools.c | 4 | ||||
-rw-r--r-- | source/blender/src/outliner.c | 16 | ||||
-rw-r--r-- | source/blender/src/poseobject.c | 2 | ||||
-rw-r--r-- | source/blender/src/toets.c | 10 | ||||
-rw-r--r-- | source/blender/src/verse_object.c | 2 |
18 files changed, 69 insertions, 61 deletions
diff --git a/source/blender/include/BDR_editobject.h b/source/blender/include/BDR_editobject.h index 83ff29d72cc..b86209f46f6 100644 --- a/source/blender/include/BDR_editobject.h +++ b/source/blender/include/BDR_editobject.h @@ -56,9 +56,13 @@ void make_vertex_parent(void); int test_parent_loop(struct Object *par, struct Object *ob); void make_parent(void); -void exit_editmode(int freedata); +#define EM_WAITCURSOR (1 << 0) +#define EM_FREEDATA (1 << 1) +#define EM_FREEUNDO (1 << 2) + +void exit_editmode(int flag); void check_editmode(int type); -void enter_editmode(void); +void enter_editmode(int wc); void docentre(int centremode); void docentre_new(void); diff --git a/source/blender/python/api2_2x/Blender.c b/source/blender/python/api2_2x/Blender.c index e4cbd0dab0d..8b013068e13 100644 --- a/source/blender/python/api2_2x/Blender.c +++ b/source/blender/python/api2_2x/Blender.c @@ -609,7 +609,7 @@ static PyObject *Blender_Load( PyObject * self, PyObject * args ) } if( G.obedit ) - exit_editmode( 1 ); + exit_editmode(EM_FREEDATA); if (G.background) { /* background mode */ if (is_blend_file) diff --git a/source/blender/python/api2_2x/NMesh.c b/source/blender/python/api2_2x/NMesh.c index 722593569a3..fe97a7c916a 100644 --- a/source/blender/python/api2_2x/NMesh.c +++ b/source/blender/python/api2_2x/NMesh.c @@ -3253,8 +3253,8 @@ static PyObject *M_NMesh_PutRaw( PyObject * self, PyObject * args ) EXPP_allqueue( REDRAWVIEW3D, 0 ); if (ob && G.obedit) { /* prevents a crash when a new object is created */ - exit_editmode(1); - enter_editmode(); + exit_editmode(EM_FREEDATA); + enter_editmode(0); } // @OK...this requires some explanation: diff --git a/source/blender/python/api2_2x/Object.c b/source/blender/python/api2_2x/Object.c index b4f784c67b5..6aeff4b320c 100644 --- a/source/blender/python/api2_2x/Object.c +++ b/source/blender/python/api2_2x/Object.c @@ -1839,7 +1839,7 @@ static PyObject *Object_join( BPy_Object * self, PyObject * args ) /* exit editmode so join can be done */ if( G.obedit ) - exit_editmode( 1 ); + exit_editmode( EM_FREEDATA ); temp_scene = add_scene( "Scene" ); /* make the new scene */ temp_scene->lay= 1; /* first layer on */ diff --git a/source/blender/python/api2_2x/Window.c b/source/blender/python/api2_2x/Window.c index 9c40f9ffa29..175e8a7b18b 100644 --- a/source/blender/python/api2_2x/Window.c +++ b/source/blender/python/api2_2x/Window.c @@ -899,14 +899,14 @@ static PyObject *M_Window_EditMode( PyObject * self, PyObject * args ) if( status >= 0 ) { if( status ) { if( !G.obedit ) - enter_editmode( ); + enter_editmode(0); } else if( G.obedit ) { if( do_undo && U.undosteps != 0 ) { if( undo_str_len > 63 ) undo_str[63] = '\0'; /* 64 is max */ undo_push_mesh( undo_str ); /* use better solution after 2.34 */ } - exit_editmode( 1 ); + exit_editmode( EM_FREEDATA ); } } diff --git a/source/blender/src/drawscene.c b/source/blender/src/drawscene.c index 4528c2125f4..6d5251494c0 100644 --- a/source/blender/src/drawscene.c +++ b/source/blender/src/drawscene.c @@ -71,7 +71,7 @@ void set_scene(Scene *sce) /* also see scene.c: set_scene_bg() */ /* ending all modes */ if( G.obedit) - exit_editmode(2); + exit_editmode(EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR); if(G.f & G_FACESELECT) set_faceselect(); diff --git a/source/blender/src/editarmature.c b/source/blender/src/editarmature.c index 87ef080807f..ecf0958efc4 100644 --- a/source/blender/src/editarmature.c +++ b/source/blender/src/editarmature.c @@ -384,7 +384,7 @@ int join_armature(void) /* Put the active armature into editmode and join the bones from the other one*/ - enter_editmode(); + enter_editmode(EM_WAITCURSOR); for (base=FIRSTBASE; base; base=nextbase) { nextbase = base->next; @@ -447,7 +447,7 @@ int join_armature(void) DAG_scene_sort(G.scene); // because we removed object(s) - exit_editmode(1); + exit_editmode(EM_FREEDATA|EM_WAITCURSOR); allqueue(REDRAWVIEW3D, 0); allqueue(REDRAWOOPS, 0); return 1; diff --git a/source/blender/src/editcurve.c b/source/blender/src/editcurve.c index a899cee70d9..54645bce9c9 100644 --- a/source/blender/src/editcurve.c +++ b/source/blender/src/editcurve.c @@ -3357,8 +3357,8 @@ int join_curve(int type) DAG_scene_sort(G.scene); // because we removed object(s), call before editmode! - enter_editmode(); - exit_editmode(1); + enter_editmode(EM_WAITCURSOR); + exit_editmode(EM_FREEDATA|EM_WAITCURSOR); allqueue(REDRAWVIEW3D, 0); allqueue(REDRAWBUTSEDIT, 0); diff --git a/source/blender/src/editfont.c b/source/blender/src/editfont.c index e7b65f15f16..9447ef59bbb 100644 --- a/source/blender/src/editfont.c +++ b/source/blender/src/editfont.c @@ -416,7 +416,7 @@ void txt_export_to_object(struct Text *text) } make_editText(); - exit_editmode(1); + exit_editmode(EM_FREEDATA|EM_WAITCURSOR); allqueue(REDRAWVIEW3D, 0); } @@ -487,7 +487,7 @@ void txt_export_to_objects(struct Text *text) cu->pos= cu->len; make_editText(); - exit_editmode(1); + exit_editmode(EM_FREEDATA|EM_WAITCURSOR); linenum++; curline = curline->next; @@ -1188,7 +1188,7 @@ void add_primitiveFont(int dummy_argument) cu->tb= MEM_callocN(MAXTEXTBOX*sizeof(TextBox), "textbox"); cu->tb[0].w = cu->tb[0].h = 0.0; - enter_editmode(); + enter_editmode(EM_WAITCURSOR); allqueue(REDRAWALL, 0); } diff --git a/source/blender/src/editmesh.c b/source/blender/src/editmesh.c index 72b118b56a2..7d2837df241 100644 --- a/source/blender/src/editmesh.c +++ b/source/blender/src/editmesh.c @@ -801,7 +801,6 @@ void make_editMesh() return; } - waitcursor(1); /* initialize fastmalloc for editmesh */ init_editmesh_fastmalloc(G.editMesh, me->totvert, me->totedge, me->totface); @@ -948,7 +947,6 @@ void make_editMesh() countall(); - waitcursor(0); } /* makes Mesh out of editmesh */ @@ -969,7 +967,6 @@ void load_editMesh(void) int i, a, ototvert, totedge=0; MDeformVert *dvert; - waitcursor(1); #ifdef WITH_VERSE if(em->vnode) { @@ -1363,7 +1360,6 @@ void load_editMesh(void) } mesh_calc_normals(me->mvert, me->totvert, me->mface, me->totface, NULL); - waitcursor(0); } void remake_editMesh(void) diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c index 03de38ac51c..55bfa4d3d46 100644 --- a/source/blender/src/editobject.c +++ b/source/blender/src/editobject.c @@ -187,7 +187,7 @@ void add_object_draw(int type) /* for toolbox or menus, only non-editmode stuff setcursor_space(SPACE_VIEW3D, CURSOR_STD); if ELEM3(curarea->spacetype, SPACE_VIEW3D, SPACE_BUTS, SPACE_INFO) { - if (G.obedit) exit_editmode(2); // freedata, and undo + if (G.obedit) exit_editmode(EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR); // freedata, and undo ob= add_object(type); set_active_base(BASACT); base_init_from_view3d(BASACT, G.vd); @@ -1449,7 +1449,7 @@ void make_parent(void) } -void enter_editmode(void) +void enter_editmode(int wc) { Base *base; Object *ob; @@ -1474,6 +1474,8 @@ void enter_editmode(void) return; } + if(wc) waitcursor(1); + if(ob->type==OB_MESH) { me= get_mesh(ob); if( me==0 ) return; @@ -1534,16 +1536,20 @@ void enter_editmode(void) } else G.obedit= NULL; - + + if(wc) waitcursor(0); + scrarea_queue_headredraw(curarea); } -void exit_editmode(int freedata) /* freedata==0 at render, 1= freedata, 2= do undo buffer too */ +void exit_editmode(int flag) /* freedata==0 at render, 1= freedata, 2= do undo buffer too */ { Object *ob; - + int freedata = flag & EM_FREEDATA, freeundo = flag & EM_FREEUNDO; + if(G.obedit==NULL) return; + if(flag & EM_WAITCURSOR) waitcursor(1); if(G.obedit->type==OB_MESH) { /* temporal */ @@ -1614,8 +1620,10 @@ void exit_editmode(int freedata) /* freedata==0 at render, 1= freedata, 2= do un scrarea_queue_headredraw(curarea); - if(G.obedit==NULL && freedata==2) + if(G.obedit==NULL && flag & EM_FREEUNDO) BIF_undo_push("Editmode"); + + if(flag & EM_WAITCURSOR) waitcursor(0); } void check_editmode(int type) @@ -1623,7 +1631,7 @@ void check_editmode(int type) if (G.obedit==0 || G.obedit->type==type) return; - exit_editmode(2); // freedata, and undo + exit_editmode(EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR); // freedata, and undo } /* 0 == do centre, 1 == centre new, 2 == centre cursor */ @@ -2481,8 +2489,8 @@ void convertmenu(void) /* texspace and normals */ BASACT= base; - enter_editmode(); - exit_editmode(1); // freedata, but no undo + enter_editmode(EM_WAITCURSOR); + exit_editmode(EM_FREEDATA|EM_WAITCURSOR); // freedata, but no undo BASACT= basact; } } @@ -2525,8 +2533,8 @@ void convertmenu(void) /* So we can see the wireframe */ BASACT= basen; - enter_editmode(); - exit_editmode(1); // freedata, but no undo + enter_editmode(EM_WAITCURSOR); + exit_editmode(EM_FREEDATA|EM_WAITCURSOR); // freedata, but no undo BASACT= basact; /* If the original object is active then make this object active */ @@ -3451,9 +3459,9 @@ void apply_object() /* texspace and normals */ BASACT= base; - enter_editmode(); + enter_editmode(EM_WAITCURSOR); BIF_undo_push("Applied object"); // editmode undo itself - exit_editmode(1); // freedata, but no undo + exit_editmode(EM_FREEDATA|EM_WAITCURSOR); // freedata, but no undo BASACT= basact; } @@ -3519,9 +3527,9 @@ void apply_object() /* texspace and normals */ BASACT= base; - enter_editmode(); + enter_editmode(EM_WAITCURSOR); BIF_undo_push("Applied object"); // editmode undo itself - exit_editmode(1); // freedata, but no undo + exit_editmode(EM_FREEDATA|EM_WAITCURSOR); // freedata, but no undo BASACT= basact; } } diff --git a/source/blender/src/header_info.c b/source/blender/src/header_info.c index 98f07ca2393..6ab3f8fee69 100644 --- a/source/blender/src/header_info.c +++ b/source/blender/src/header_info.c @@ -492,7 +492,7 @@ void do_info_buttons(unsigned short event) if(okee("Delete current scene")) { /* exit modes... could become single call once */ - exit_editmode(1); + exit_editmode(EM_FREEDATA|EM_WAITCURSOR); if(G.f & G_VERTEXPAINT) set_vpaint(); /* Switch off vertex paint */ if(G.f & G_TEXTUREPAINT) set_texturepaint(); /* Switch off tex paint */ if(G.f & G_WEIGHTPAINT) set_wpaint(); /* Switch off weight paint */ diff --git a/source/blender/src/header_view3d.c b/source/blender/src/header_view3d.c index 42dc0343aea..f514c51a94f 100644 --- a/source/blender/src/header_view3d.c +++ b/source/blender/src/header_view3d.c @@ -4295,7 +4295,7 @@ void do_view3d_buttons(short event) if(G.f & G_WEIGHTPAINT) set_wpaint(); /* Switch off weight paint */ if(G.f & G_FACESELECT) set_faceselect(); /* Switch off face select */ if(ob) exit_posemode(); /* exit posemode for active object */ - if(G.obedit) exit_editmode(2); /* exit editmode and undo */ + if(G.obedit) exit_editmode(EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR); /* exit editmode and undo */ } else if (G.vd->modeselect == V3D_EDITMODE_SEL) { if(!G.obedit) { @@ -4304,13 +4304,13 @@ void do_view3d_buttons(short event) if(G.f & G_TEXTUREPAINT) set_texturepaint(); /* Switch off tex paint */ if(G.f & G_WEIGHTPAINT) set_wpaint(); /* Switch off weight paint */ - enter_editmode(); + enter_editmode(EM_WAITCURSOR); BIF_undo_push("Original"); /* here, because all over code enter_editmode is abused */ } } else if (G.vd->modeselect == V3D_FACESELECTMODE_SEL) { if ((G.obedit) && (G.f & G_FACESELECT)) { - exit_editmode(2); /* exit editmode and undo */ + exit_editmode(EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR); /* exit editmode and undo */ } else if ((G.f & G_FACESELECT) && (G.f & G_VERTEXPAINT)) { if(G.f & G_VERTEXPAINT) set_vpaint(); /* Switch off vertex paint */ } else if ((G.f & G_FACESELECT) && (G.f & G_TEXTUREPAINT)) { @@ -4320,7 +4320,7 @@ void do_view3d_buttons(short event) if(G.f & G_VERTEXPAINT) set_vpaint(); /* Switch off vertex paint */ if(G.f & G_TEXTUREPAINT) set_texturepaint(); /* Switch off tex paint */ if(G.f & G_WEIGHTPAINT) set_wpaint(); /* Switch off weight paint */ - if (G.obedit) exit_editmode(2); /* exit editmode and undo */ + if (G.obedit) exit_editmode(EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR); /* exit editmode and undo */ set_faceselect(); } @@ -4330,7 +4330,7 @@ void do_view3d_buttons(short event) G.vd->flag &= ~V3D_MODE; if(G.f & G_TEXTUREPAINT) set_texturepaint(); /* Switch off tex paint */ if(G.f & G_WEIGHTPAINT) set_wpaint(); /* Switch off weight paint */ - if(G.obedit) exit_editmode(2); /* exit editmode and undo */ + if(G.obedit) exit_editmode(EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR); /* exit editmode and undo */ set_vpaint(); } @@ -4340,7 +4340,7 @@ void do_view3d_buttons(short event) G.vd->flag &= ~V3D_MODE; if(G.f & G_VERTEXPAINT) set_vpaint(); /* Switch off vertex paint */ if(G.f & G_WEIGHTPAINT) set_wpaint(); /* Switch off weight paint */ - if(G.obedit) exit_editmode(2); /* exit editmode and undo */ + if(G.obedit) exit_editmode(EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR); /* exit editmode and undo */ set_texturepaint(); } @@ -4350,7 +4350,7 @@ void do_view3d_buttons(short event) G.vd->flag &= ~V3D_MODE; if(G.f & G_VERTEXPAINT) set_vpaint(); /* Switch off vertex paint */ if(G.f & G_TEXTUREPAINT) set_texturepaint(); /* Switch off tex paint */ - if(G.obedit) exit_editmode(2); /* exit editmode and undo */ + if(G.obedit) exit_editmode(EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR); /* exit editmode and undo */ set_wpaint(); } @@ -4359,7 +4359,7 @@ void do_view3d_buttons(short event) if (ob) { G.vd->flag &= ~V3D_MODE; - if(G.obedit) exit_editmode(2); /* exit editmode and undo */ + if(G.obedit) exit_editmode(EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR); /* exit editmode and undo */ enter_posemode(); } diff --git a/source/blender/src/meshtools.c b/source/blender/src/meshtools.c index 03771e3df93..677ae69d4ad 100644 --- a/source/blender/src/meshtools.c +++ b/source/blender/src/meshtools.c @@ -454,8 +454,8 @@ int join_mesh(void) DAG_scene_sort(G.scene); // removed objects, need to rebuild dag before editmode call - enter_editmode(); - exit_editmode(1); // freedata, but no undo + enter_editmode(EM_WAITCURSOR); + exit_editmode(EM_FREEDATA|EM_WAITCURSOR); // freedata, but no undo allqueue(REDRAWVIEW3D, 0); allqueue(REDRAWBUTSSHADING, 0); diff --git a/source/blender/src/outliner.c b/source/blender/src/outliner.c index e603ca9c1d8..e96f6a557a8 100644 --- a/source/blender/src/outliner.c +++ b/source/blender/src/outliner.c @@ -1056,7 +1056,7 @@ static void tree_element_active_object(SpaceOops *soops, TreeElement *te) sce= (Scene *)outliner_search_back(soops, te, ID_SCE); if(sce && G.scene != sce) { - if(G.obedit) exit_editmode(2); + if(G.obedit) exit_editmode(EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR); set_scene(sce); } @@ -1087,7 +1087,7 @@ static void tree_element_active_object(SpaceOops *soops, TreeElement *te) allqueue(REDRAWINFO, 1); } - if(ob!=G.obedit) exit_editmode(2); + if(ob!=G.obedit) exit_editmode(EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR); } static int tree_element_active_material(SpaceOops *soops, TreeElement *te, int set) @@ -1244,7 +1244,7 @@ static int tree_element_active_world(SpaceOops *soops, TreeElement *te, int set) if(set) { // make new scene active if(sce && G.scene != sce) { - if(G.obedit) exit_editmode(2); + if(G.obedit) exit_editmode(EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR); set_scene(sce); } } @@ -1500,7 +1500,7 @@ static int tree_element_active_pose(TreeElement *te, TreeStoreElem *tselem, int Object *ob= (Object *)tselem->id; if(set) { - if(G.obedit) exit_editmode(2); + if(G.obedit) exit_editmode(EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR); if(ob->flag & OB_POSEMODE) exit_posemode(); else enter_posemode(); } @@ -1642,14 +1642,14 @@ static int do_outliner_mouse_event(SpaceOops *soops, TreeElement *te, short even /* editmode? */ if(te->idcode==ID_SCE) { if(G.scene!=(Scene *)tselem->id) { - if(G.obedit) exit_editmode(2); + if(G.obedit) exit_editmode(EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR); set_scene((Scene *)tselem->id); } } else if(ELEM5(te->idcode, ID_ME, ID_CU, ID_MB, ID_LT, ID_AR)) { - if(G.obedit) exit_editmode(2); + if(G.obedit) exit_editmode(EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR); else { - enter_editmode(); + enter_editmode(EM_WAITCURSOR); extern_set_butspace(F9KEY, 0); } } @@ -2015,7 +2015,7 @@ static void object_delete_cb(TreeElement *te, TreeStoreElem *tsep, TreeStoreElem if(base==NULL) base= object_in_scene((Object *)tselem->id, G.scene); if(base) { // check also library later - if(G.obedit==base->object) exit_editmode(2); + if(G.obedit==base->object) exit_editmode(EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR); if(base==BASACT) { G.f &= ~(G_VERTEXPAINT+G_FACESELECT+G_TEXTUREPAINT+G_WEIGHTPAINT); diff --git a/source/blender/src/poseobject.c b/source/blender/src/poseobject.c index ddbd5e88ea6..6cc4a986cc1 100644 --- a/source/blender/src/poseobject.c +++ b/source/blender/src/poseobject.c @@ -114,7 +114,7 @@ void enter_posemode(void) return; } - if (G.obedit) exit_editmode(1); + if (G.obedit) exit_editmode(EM_FREEDATA|EM_WAITCURSOR); G.f &= ~(G_VERTEXPAINT | G_FACESELECT | G_TEXTUREPAINT | G_WEIGHTPAINT); } diff --git a/source/blender/src/toets.c b/source/blender/src/toets.c index 2b6327df80c..be204c08c71 100644 --- a/source/blender/src/toets.c +++ b/source/blender/src/toets.c @@ -652,11 +652,11 @@ int blenderqread(unsigned short event, short val) else if(G.vd) { /* also when Alt-E */ if(G.obedit==NULL) { - enter_editmode(); + enter_editmode(EM_WAITCURSOR); if(G.obedit) BIF_undo_push("Original"); // here, because all over code enter_editmode is abused } else - exit_editmode(2); // freedata, and undo + exit_editmode(EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR); // freedata, and undo } return 0; } @@ -676,7 +676,7 @@ int blenderqread(unsigned short event, short val) } else if(G.qual==LR_SHIFTKEY) { // ?? if(G.obedit) - exit_editmode(2); // freedata, and undo + exit_editmode(EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR); // freedata, and undo if(G.f & G_FACESELECT) set_faceselect(); if(G.f & G_VERTEXPAINT) @@ -710,11 +710,11 @@ int blenderqread(unsigned short event, short val) if(G.qual==LR_ALTKEY) { if(G.vd && textspace==0) { if(G.obedit==0) { - enter_editmode(); + enter_editmode(EM_WAITCURSOR); BIF_undo_push("Original"); } else - exit_editmode(2); // freedata, and undo + exit_editmode(EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR); // freedata, and undo return 0; } } diff --git a/source/blender/src/verse_object.c b/source/blender/src/verse_object.c index b23142250e6..623668b86cd 100644 --- a/source/blender/src/verse_object.c +++ b/source/blender/src/verse_object.c @@ -384,7 +384,7 @@ void b_verse_unsubscribe(VNode *vnode) if(vnode->type != V_NT_OBJECT) return; if(G.obedit && G.obedit->vnode == (void*)vnode) - exit_editmode(2); + exit_editmode(EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR); /* create mesh data */ while(vlink){ |