Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-10-31 15:31:25 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-10-31 15:31:25 +0400
commitebdc9056af48279884c3d014821cb4f75738beed (patch)
tree7e7c8010afcbe2f6f8d6a32ec1a7c792ee483db9
parentc85488ff9ee69a5f51cfcc658e028fac6ffdab80 (diff)
Fix for #29056: NDOF motion events not configurable in user preferences.
-rw-r--r--release/scripts/startup/bl_ui/space_userpref_keymap.py4
-rw-r--r--source/blender/makesrna/intern/rna_wm.c5
2 files changed, 5 insertions, 4 deletions
diff --git a/release/scripts/startup/bl_ui/space_userpref_keymap.py b/release/scripts/startup/bl_ui/space_userpref_keymap.py
index da498268b9b..81d67aa662c 100644
--- a/release/scripts/startup/bl_ui/space_userpref_keymap.py
+++ b/release/scripts/startup/bl_ui/space_userpref_keymap.py
@@ -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="")
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index 23587bf6cd6..e5f44644f7a 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -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;
}
}