Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeoffrey Bantle <hairbat@yahoo.com>2006-09-28 05:55:44 +0400
committerGeoffrey Bantle <hairbat@yahoo.com>2006-09-28 05:55:44 +0400
commitb4e97c01ff7478cc7fbcbc33d12e37375d28b7aa (patch)
tree837f2343bcd112d6aa95bede310dcc8644ca4a76 /source/blender/src/outliner.c
parentd86af04e9afc4c7f6946c0fce7129cd6acd4dbf5 (diff)
-> 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.
Diffstat (limited to 'source/blender/src/outliner.c')
-rw-r--r--source/blender/src/outliner.c16
1 files changed, 8 insertions, 8 deletions
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);