-> Enter/Exit editmode wait cursor flags
The wait cursor was being called during editmode enter and exit for meshes. This was a problem for several reasons. First of all, python modules like Mesh now make use of editmode features. These methods that wrap editmode tools may be called many times during the execution of a script and lead to the wait cursor rapidly flickering on and off. The other problem was that the wait cursor wasn't being called for editmode enter and exit of all data types. This is unified now. -New Arguments enter_editmode() should be passed a nonzero integer or simply EM_WAITCURSOR if the wait cursor is desired. Currently only the python API passes a '0' to enter_editmode() exit_editmode() has several options and they are passed in as the bitflags EM_FREEDATA, EM_FREEUNDO and EM_WAITCURSOR. These flags are defined in BDR_editobject.h.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user