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:
authorCampbell Barton <ideasman42@gmail.com>2013-07-08 11:25:33 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-08 11:25:33 +0400
commit2c87b8818058c02e32c92f259df5659c5b5c9eeb (patch)
tree796b794300660d65ab832221e145f2a18e653dd2 /release/scripts/startup/bl_ui/space_userpref.py
parent37d1984c53870c28c3c27165cba11f4f039706af (diff)
re-arrange space_userpref_keymap, no need to use a subclass here, just import the module and call draw_keymaps().
- making this change now because some addons developers are interested in showing keymap UI in their addons prefs and using the class involved making a fake class instance which isnt needed.
Diffstat (limited to 'release/scripts/startup/bl_ui/space_userpref.py')
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py25
1 files changed, 20 insertions, 5 deletions
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 54387f10a8d..a5e4b6e10bf 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -917,9 +917,6 @@ class USERPREF_PT_file(Panel):
col.prop(system, "author", text="")
-from bl_ui.space_userpref_keymap import InputKeyMapPanel
-
-
class USERPREF_MT_ndof_settings(Menu):
# accessed from the window key-bindings in C (only)
bl_label = "3D Mouse Settings"
@@ -960,9 +957,25 @@ class USERPREF_MT_ndof_settings(Menu):
layout.prop(input_prefs, "ndof_lock_horizon", icon='NDOF_DOM')
-class USERPREF_PT_input(Panel, InputKeyMapPanel):
+class USERPREF_MT_keyconfigs(Menu):
+ bl_label = "KeyPresets"
+ preset_subdir = "keyconfig"
+ preset_operator = "wm.keyconfig_activate"
+
+ def draw(self, context):
+ props = self.layout.operator("wm.context_set_value", text="Blender (default)")
+ props.data_path = "window_manager.keyconfigs.active"
+ props.value = "context.window_manager.keyconfigs.default"
+
+ # now draw the presets
+ Menu.draw_preset(self, context)
+
+
+class USERPREF_PT_input(Panel):
bl_space_type = 'USER_PREFERENCES'
bl_label = "Input"
+ bl_region_type = 'WINDOW'
+ bl_options = {'HIDE_HEADER'}
@classmethod
def poll(cls, context):
@@ -1039,6 +1052,8 @@ class USERPREF_PT_input(Panel, InputKeyMapPanel):
row.separator()
def draw(self, context):
+ from bl_ui.space_userpref_keymap import draw_keymaps
+
layout = self.layout
#import time
@@ -1055,7 +1070,7 @@ class USERPREF_PT_input(Panel, InputKeyMapPanel):
self.draw_input_prefs(inputs, split)
# Keymap Settings
- self.draw_keymaps(context, split)
+ draw_keymaps(context, split)
#print("runtime", time.time() - start)