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:
authorCampbell Barton <ideasman42@gmail.com>2007-08-21 23:37:06 +0400
committerCampbell Barton <ideasman42@gmail.com>2007-08-21 23:37:06 +0400
commit5aa41327dafe91ed0367ed99e829aa1367a94ecf (patch)
tree6b5c28a54a94b0ff2c62efa457ed8ea6e2efbcf7
parent6ea872e3e5e688a4de8032cbf6aee61042f7d9fd (diff)
obj export had the overwrite confirmation commented out from testing, UIBlock needed to clear the events so tooltips show.
-rw-r--r--release/scripts/export_obj.py4
-rw-r--r--source/blender/python/api2_2x/Draw.c18
2 files changed, 20 insertions, 2 deletions
diff --git a/release/scripts/export_obj.py b/release/scripts/export_obj.py
index 9f371e9a218..ded29af1924 100644
--- a/release/scripts/export_obj.py
+++ b/release/scripts/export_obj.py
@@ -512,8 +512,8 @@ def write_ui(filename):
if not filename.lower().endswith('.obj'):
filename += '.obj'
- #if not BPyMessages.Warning_SaveOver(filename):
- # return
+ if not BPyMessages.Warning_SaveOver(filename):
+ return
EXPORT_APPLY_MODIFIERS = Draw.Create(1)
EXPORT_ROTX90 = Draw.Create(1)
diff --git a/source/blender/python/api2_2x/Draw.c b/source/blender/python/api2_2x/Draw.c
index db8b6305dc7..54ff927a2b3 100644
--- a/source/blender/python/api2_2x/Draw.c
+++ b/source/blender/python/api2_2x/Draw.c
@@ -1098,6 +1098,24 @@ static PyObject *Method_UIBlock( PyObject * self, PyObject * args )
PyErr_Print( );
error( "Python script error: check console" );
} else {
+ /* copied from do_clever_numbuts in toolbox.c */
+
+ /* Clear all events so tooltips work, this is not ideal and
+ only needed because calls from the menu still have some events
+ left over when do_clever_numbuts is called.
+ Calls from keyshortcuts do not have this problem.*/
+ ScrArea *sa;
+ BWinEvent temp_bevt;
+ for (sa= G.curscreen->areabase.first; sa; sa= sa->next) {
+ if(sa->win) {
+ while( bwin_qread( sa->win, &temp_bevt ) ) {}
+ }
+ if(sa->headwin) {
+ while( bwin_qread( sa->headwin, &temp_bevt ) ) {}
+ }
+ }
+ /* Done clearing events */
+
uiBoundsBlock(uiblock, 5);
uiDoBlocks(&listb, 0);
}