obj export had the overwrite confirmation commented out from testing, UIBlock needed...
authorCampbell Barton <ideasman42@gmail.com>
Tue, 21 Aug 2007 19:37:03 +0000 (19:37 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 21 Aug 2007 19:37:03 +0000 (19:37 +0000)
release/scripts/export_obj.py
source/blender/python/api2_2x/Draw.c

index 9f371e9a2184dc4180162d031c2f4f44bb40d113..ded29af1924f41a043f33d691b4be16358f25df9 100644 (file)
@@ -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)
index db8b6305dc73f253167cb0c115a41ef3b3944590..54ff927a2b31e28a20594a1460d55b7695bdb26b 100644 (file)
@@ -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);
        }