=BPy bugfix=
[blender.git] / source / blender / src / space.c
index d815f708799e789edfb2df4d322b45293afc0e02..77584ac21aa9fcc45b74b03023dc76b643dbe7cc 100644 (file)
@@ -1194,7 +1194,14 @@ static void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
                if(event==UI_BUT_EVENT) do_butspace(val); /* temporal, view3d deserves own queue? */
                
                /* we consider manipulator a button, defaulting to leftmouse */
-               if(event==LEFTMOUSE) if(BIF_do_manipulator(sa)) return;
+               if(event==LEFTMOUSE) {
+                       /* run any view3d event handler script links */
+                       if (event && sa->scriptlink.totscript)
+                               if (BPY_do_spacehandlers(sa, event, SPACEHANDLER_VIEW3D_EVENT))
+                                       return; /* return if event was processed (swallowed) by handler(s) */
+
+                       if(BIF_do_manipulator(sa)) return;
+               }
                
                /* swap mouse buttons based on user preference */
                if (U.flag & USER_LMOUSESELECT) {