Fix for #29056: NDOF motion events not configurable in user preferences.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 31 Oct 2012 11:31:25 +0000 (11:31 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 31 Oct 2012 11:31:25 +0000 (11:31 +0000)
release/scripts/startup/bl_ui/space_userpref_keymap.py
source/blender/makesrna/intern/rna_wm.c

index da498268b9bb2777003d46ba59682295c9d8682c..81d67aa662c6c04c01a845c168231a90647592de 100644 (file)
@@ -186,10 +186,10 @@ class InputKeyMapPanel:
                 sub = split.column()
                 subrow = sub.row(align=True)
 
-                if map_type in {'KEYBOARD', 'NDOF'}:
+                if map_type == 'KEYBOARD':
                     subrow.prop(kmi, "type", text="", event=True)
                     subrow.prop(kmi, "value", text="")
-                elif map_type == 'MOUSE':
+                elif map_type in {'MOUSE', 'NDOF'}:
                     subrow.prop(kmi, "type", text="")
                     subrow.prop(kmi, "value", text="")
 
index 23587bf6cd6e4fa0641d697bb983489d7b07451b..e5f44644f7a264bb864ec7ed49a96330cc9237c0 100644 (file)
@@ -122,6 +122,7 @@ EnumPropertyItem event_timer_type_items[] = {
 };
 
 EnumPropertyItem event_ndof_type_items[] = {
+       {NDOF_MOTION, "NDOF_MOTION", 0, "Motion", ""},
        /* buttons on all 3dconnexion devices */
        {NDOF_BUTTON_MENU, "NDOF_BUTTON_MENU", 0, "Menu", ""},
        {NDOF_BUTTON_FIT, "NDOF_BUTTON_FIT", 0, "Fit", ""},
@@ -622,8 +623,8 @@ static void rna_wmKeyMapItem_map_type_set(PointerRNA *ptr, int value)
                                kmi->val = KM_NOTHING;
                                break;
                        case KMI_TYPE_NDOF:
-                               kmi->type = NDOF_BUTTON_MENU;
-                               kmi->val = KM_PRESS;
+                               kmi->type = NDOF_MOTION;
+                               kmi->val = KM_NOTHING;
                                break;
                }
        }