-> 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:
2006-09-28 01:55:44 +00:00
parent d86af04e9a
commit b4e97c01ff
18 changed files with 69 additions and 61 deletions

View File

@@ -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 );
}
}