NDOF: show invert pan & zoom in the menu outside the 3d view
authorCampbell Barton <ideasman42@gmail.com>
Tue, 18 Feb 2014 00:39:26 +0000 (11:39 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 18 Feb 2014 00:57:49 +0000 (11:57 +1100)
release/scripts/startup/bl_ui/space_userpref.py

index dc2ff0d854412152d2bcf7f07061d54f474a91a9..fbaa06f7aa333cdeeb409e4e132247d2961bbd90 100644 (file)
@@ -950,11 +950,12 @@ class USERPREF_MT_ndof_settings(Menu):
 
         input_prefs = context.user_preferences.inputs
 
-        layout.separator()
         layout.prop(input_prefs, "ndof_sensitivity")
         layout.prop(input_prefs, "ndof_orbit_sensitivity")
 
-        if context.space_data.type == 'VIEW_3D':
+        is_view3d = context.space_data.type == 'VIEW_3D'
+
+        if is_view3d:
             layout.separator()
             layout.prop(input_prefs, "ndof_show_guide")
 
@@ -965,16 +966,19 @@ class USERPREF_MT_ndof_settings(Menu):
             layout.prop(input_prefs, "ndof_tilt_invert_axis")
             layout.prop(input_prefs, "ndof_rotate_invert_axis")
 
-            layout.separator()
-            layout.label(text="Pan options")
-            layout.prop(input_prefs, "ndof_panx_invert_axis")
-            layout.prop(input_prefs, "ndof_pany_invert_axis")
-            layout.prop(input_prefs, "ndof_panz_invert_axis")
-            layout.prop(input_prefs, "ndof_pan_yz_swap_axis")
 
-            layout.label(text="Zoom options")
-            layout.prop(input_prefs, "ndof_zoom_invert")
+        # view2d use pan/zoom
+        layout.separator()
+        layout.label(text="Pan options")
+        layout.prop(input_prefs, "ndof_panx_invert_axis")
+        layout.prop(input_prefs, "ndof_pany_invert_axis")
+        layout.prop(input_prefs, "ndof_panz_invert_axis")
+        layout.prop(input_prefs, "ndof_pan_yz_swap_axis")
+
+        layout.label(text="Zoom options")
+        layout.prop(input_prefs, "ndof_zoom_invert")
 
+        if is_view3d:
             layout.separator()
             layout.label(text="Fly/Walk options")
             layout.prop(input_prefs, "ndof_fly_helicopter", icon='NDOF_FLY')