From 5aa41327dafe91ed0367ed99e829aa1367a94ecf Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 21 Aug 2007 19:37:06 +0000 Subject: obj export had the overwrite confirmation commented out from testing, UIBlock needed to clear the events so tooltips show. --- release/scripts/export_obj.py | 4 ++-- source/blender/python/api2_2x/Draw.c | 18 ++++++++++++++++++ 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); } -- cgit v1.2.3