NDOF: allow view movement for modal border and circle select operators.
authorKai Mach <>
Sat, 10 Sep 2016 21:33:26 +0000 (23:33 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Sat, 10 Sep 2016 21:37:53 +0000 (23:37 +0200)
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2167

source/blender/windowmanager/intern/wm_operators.c

index 0c137221856c77fef2cc31b23e6c0984e6ba6252..7177244611e33ef1c5ec66360e0cb8369f85bcfd 100644 (file)
@@ -2299,6 +2299,11 @@ int WM_border_select_modal(bContext *C, wmOperator *op, const wmEvent *event)
                }
 
        }
+#ifdef WITH_INPUT_NDOF
+       else if (event->type == NDOF_MOTION) {
+               return OPERATOR_PASS_THROUGH;
+       }
+#endif
 //     /* Allow view navigation??? */
 //     else {
 //             return OPERATOR_PASS_THROUGH;
@@ -2413,6 +2418,11 @@ int WM_gesture_circle_modal(bContext *C, wmOperator *op, const wmEvent *event)
                                return OPERATOR_FINISHED; /* use finish or we don't get an undo */
                }
        }
+#ifdef WITH_INPUT_NDOF
+       else if (event->type == NDOF_MOTION) {
+               return OPERATOR_PASS_THROUGH;
+       }
+#endif
        /* Allow view navigation??? */
        /* note, this gives issues: 1) other modal ops run on top (border select), 2) middlemouse is used now 3) tablet/trackpad? */
 //     else {