[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11778] trunk/blender: obj export had the overwrite confirmation commented out from testing, UIBlock needed to clear the events so tooltips show.
Campbell Barton
cbarton at metavr.com
Tue Aug 21 21:37:04 CEST 2007
Revision: 11778
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11778
Author: campbellbarton
Date: 2007-08-21 21:37:03 +0200 (Tue, 21 Aug 2007)
Log Message:
-----------
obj export had the overwrite confirmation commented out from testing, UIBlock needed to clear the events so tooltips show.
Modified Paths:
--------------
trunk/blender/release/scripts/export_obj.py
trunk/blender/source/blender/python/api2_2x/Draw.c
Modified: trunk/blender/release/scripts/export_obj.py
===================================================================
--- trunk/blender/release/scripts/export_obj.py 2007-08-21 18:44:32 UTC (rev 11777)
+++ trunk/blender/release/scripts/export_obj.py 2007-08-21 19:37:03 UTC (rev 11778)
@@ -512,8 +512,8 @@
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)
Modified: trunk/blender/source/blender/python/api2_2x/Draw.c
===================================================================
--- trunk/blender/source/blender/python/api2_2x/Draw.c 2007-08-21 18:44:32 UTC (rev 11777)
+++ trunk/blender/source/blender/python/api2_2x/Draw.c 2007-08-21 19:37:03 UTC (rev 11778)
@@ -1098,6 +1098,24 @@
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);
}
More information about the Bf-blender-cvs
mailing list