diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_wm.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_wm.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index 026d2e209a3..ba77e2a1768 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -118,6 +118,7 @@ static EnumPropertyItem event_textinput_type_items[] = { {0, NULL, 0, NULL, NULL} }; +#ifdef WITH_INPUT_NDOF static EnumPropertyItem event_ndof_type_items[] = { {NDOF_MOTION, "NDOF_MOTION", 0, "Motion", ""}, /* buttons on all 3dconnexion devices */ @@ -167,7 +168,8 @@ static EnumPropertyItem event_ndof_type_items[] = { {NDOF_BUTTON_C, "NDOF_BUTTON_C", 0, "Button C", ""}, {0, NULL, 0, NULL, NULL} }; -#endif +#endif /* WITH_INPUT_NDOF */ +#endif /* RNA_RUNTIME */ /* not returned: CAPSLOCKKEY, UNKNOWNKEY */ EnumPropertyItem rna_enum_event_type_items[] = { @@ -332,6 +334,7 @@ EnumPropertyItem rna_enum_event_type_items[] = { {TIMERREPORT, "TIMER_REPORT", 0, "Timer Report", "TmrReport"}, {TIMERREGION, "TIMERREGION", 0, "Timer Region", "TmrReg"}, {0, "", 0, NULL, NULL}, +#ifdef WITH_INPUT_NDOF {NDOF_MOTION, "NDOF_MOTION", 0, "NDOF Motion", "NdofMov"}, /* buttons on all 3dconnexion devices */ {NDOF_BUTTON_MENU, "NDOF_BUTTON_MENU", 0, "NDOF Menu", "NdofMenu"}, @@ -379,6 +382,7 @@ EnumPropertyItem rna_enum_event_type_items[] = { {NDOF_BUTTON_B, "NDOF_BUTTON_B", 0, "NDOF Button B", "NdofBB"}, {NDOF_BUTTON_C, "NDOF_BUTTON_C", 0, "NDOF Button C", "NdofBC"}, {0, NULL, 0, NULL, NULL} +#endif /* WITH_INPUT_NDOF */ }; EnumPropertyItem rna_enum_event_value_items[] = { @@ -701,10 +705,12 @@ static void rna_wmKeyMapItem_map_type_set(PointerRNA *ptr, int value) kmi->type = TIMER; kmi->val = KM_NOTHING; break; +#ifdef WITH_INPUT_NDOF case KMI_TYPE_NDOF: kmi->type = NDOF_MOTION; kmi->val = KM_NOTHING; break; +#endif } } } @@ -738,7 +744,9 @@ static EnumPropertyItem *rna_KeyMapItem_type_itemf(bContext *UNUSED(C), PointerR if (map_type == KMI_TYPE_MOUSE) return event_mouse_type_items; if (map_type == KMI_TYPE_TWEAK) return event_tweak_type_items; if (map_type == KMI_TYPE_TIMER) return event_timer_type_items; +#ifdef WITH_INPUT_NDOF if (map_type == KMI_TYPE_NDOF) return event_ndof_type_items; +#endif if (map_type == KMI_TYPE_TEXTINPUT) return event_textinput_type_items; else return rna_enum_event_type_items; } @@ -2014,7 +2022,9 @@ static void rna_def_keyconfig(BlenderRNA *brna) {KMI_TYPE_KEYBOARD, "KEYBOARD", 0, "Keyboard", ""}, {KMI_TYPE_TWEAK, "TWEAK", 0, "Tweak", ""}, {KMI_TYPE_MOUSE, "MOUSE", 0, "Mouse", ""}, +#ifdef WITH_INPUT_NDOF {KMI_TYPE_NDOF, "NDOF", 0, "NDOF", ""}, +#endif {KMI_TYPE_TEXTINPUT, "TEXTINPUT", 0, "Text Input", ""}, {KMI_TYPE_TIMER, "TIMER", 0, "Timer", ""}, {0, NULL, 0, NULL, NULL} |