UI: show active keymap user preferences
This commit is contained in:
@@ -1069,6 +1069,20 @@ class USERPREF_PT_input(Panel):
|
||||
userpref = context.user_preferences
|
||||
return (userpref.active_section == 'INPUT')
|
||||
|
||||
@staticmethod
|
||||
def draw_input_prefs_keyconfig(context, layout):
|
||||
kc = context.window_manager.keyconfigs.active
|
||||
kc_prefs = kc.preferences
|
||||
if kc_prefs is not None:
|
||||
box = layout.box()
|
||||
box.label(text=kc.name.replace("_", " ").title() + " Keymap Options")
|
||||
# Defined by user preset, may contain mistakes out of our control.
|
||||
try:
|
||||
kc_prefs.draw(box)
|
||||
except Exception:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
|
||||
@staticmethod
|
||||
def draw_input_prefs(inputs, layout):
|
||||
import sys
|
||||
@@ -1190,6 +1204,9 @@ class USERPREF_PT_input(Panel):
|
||||
# Input settings
|
||||
self.draw_input_prefs(inputs, col)
|
||||
|
||||
# When the keyconfig defines it's own preferences.
|
||||
self.draw_input_prefs_keyconfig(context, col)
|
||||
|
||||
row.separator()
|
||||
|
||||
# Keymap Settings
|
||||
|
||||
Reference in New Issue
Block a user