move the ndof menu into the userpref's since it adjusts preferences, also renamed...
authorCampbell Barton <ideasman42@gmail.com>
Fri, 5 Aug 2011 14:53:13 +0000 (14:53 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 5 Aug 2011 14:53:13 +0000 (14:53 +0000)
release/scripts/startup/bl_ui/space_userpref.py
release/scripts/startup/bl_ui/space_view3d.py
source/blender/windowmanager/intern/wm_operators.c

index 1feb1eec0c504a242b46f3bc6cd4ac0a0ad89966..e27bd8ef07aa3d4f96d8d3cdbc774b53e7a749eb 100644 (file)
@@ -755,6 +755,31 @@ class USERPREF_PT_file(bpy.types.Panel):
 from bl_ui.space_userpref_keymap import InputKeyMapPanel
 
 
+class USERPREF_MT_ndof_settings(bpy.types.Menu):
+    # accessed from the window keybindings in C (only)
+    bl_label = "3D Mouse Settings"
+
+    def draw(self, context):
+        layout = self.layout
+        input_prefs = context.user_preferences.inputs
+
+        layout.separator()
+        layout.prop(input_prefs, "ndof_sensitivity")
+
+        if context.space_data.type == 'VIEW_3D':
+            layout.separator()
+            layout.prop(input_prefs, "ndof_show_guide")
+
+            layout.separator()
+            layout.label(text="orbit options")
+            layout.prop(input_prefs, "ndof_orbit_invert_axes")
+
+            layout.separator()
+            layout.label(text="fly options")
+            layout.prop(input_prefs, "ndof_fly_helicopter", icon='NDOF_FLY')
+            layout.prop(input_prefs, "ndof_lock_horizon", icon='NDOF_DOM')
+
+
 class USERPREF_PT_input(bpy.types.Panel, InputKeyMapPanel):
     bl_space_type = 'USER_PREFERENCES'
     bl_label = "Input"
index f96a758e7cefa3e5ded37fc838c811bcf1975862..083c330f61da3cb2b8bf072daed9419671fd18ef 100644 (file)
@@ -349,30 +349,6 @@ class VIEW3D_MT_view_navigation(bpy.types.Menu):
         layout.operator("view3d.fly")
 
 
-class VIEW3D_MT_ndof_settings(bpy.types.Menu):
-    bl_label = "3D Mouse Settings"
-
-    def draw(self, context):
-        layout = self.layout
-        input_prefs = context.user_preferences.inputs
-
-        layout.separator()
-        layout.prop(input_prefs, "ndof_sensitivity")
-
-        if context.space_data.type == 'VIEW_3D':
-            layout.separator()
-            layout.prop(input_prefs, "ndof_show_guide")
-
-            layout.separator()
-            layout.label(text="orbit options")
-            layout.prop(input_prefs, "ndof_orbit_invert_axes")
-
-            layout.separator()
-            layout.label(text="fly options")
-            layout.prop(input_prefs, "ndof_fly_helicopter", icon='NDOF_FLY')
-            layout.prop(input_prefs, "ndof_lock_horizon", icon='NDOF_DOM')
-
-
 class VIEW3D_MT_view_align(bpy.types.Menu):
     bl_label = "Align View"
 
index 7238cede2ccdbcb22e346649aa0c75f61ade9605..cea2d6b3fe54991f306f4ee848bfbe29768b07d8 100644 (file)
@@ -3719,7 +3719,7 @@ void wm_window_keymap(wmKeyConfig *keyconf)
 
        /* menus that can be accessed anywhere in blender */
        WM_keymap_verify_item(keymap, "WM_OT_search_menu", SPACEKEY, KM_PRESS, 0, 0);
-       WM_keymap_add_menu(keymap, "VIEW3D_MT_ndof_settings", NDOF_BUTTON_MENU, KM_PRESS, 0, 0);
+       WM_keymap_add_menu(keymap, "USERPREF_MT_ndof_settings", NDOF_BUTTON_MENU, KM_PRESS, 0, 0);
 
        /* Space switching */
        kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", F2KEY, KM_PRESS, KM_SHIFT, 0); /* new in 2.5x, was DXF export */