bugfix [#23988] The Maya preset as default

This commit is contained in:
2010-10-06 20:29:00 +00:00
parent c02526bdf9
commit 2cabb498dc
5 changed files with 13 additions and 6 deletions

View File

@@ -256,7 +256,7 @@ class AddPresetKeyconfig(AddPresetBase, bpy.types.Operator):
'''Add a Keyconfig Preset'''
bl_idname = "wm.keyconfig_preset_add"
bl_label = "Add Keyconfig Preset"
preset_menu = "PREFS_MT_keyconfigs"
preset_menu = "USERPREF_MT_keyconfigs"
preset_subdir = "keyconfig"
def add(self, context, filepath):

View File

@@ -2,7 +2,7 @@
import bpy
wm = bpy.context.window_manager
kc = wm.keyconfigs.new('Maya')
kc = wm.keyconfigs.new('maya')
# Map 3D View
km = kc.keymaps.new('3D View', space_type='VIEW_3D', region_type='WINDOW', modal=False)

View File

@@ -127,7 +127,11 @@ class USERPREF_MT_splash(bpy.types.Menu):
row.label("")
row = split.row()
row.label("Interaction:")
row.menu("USERPREF_MT_interaction_presets", text=bpy.types.USERPREF_MT_interaction_presets.bl_label)
# XXX, no redraws
# text = bpy.path.display_name(context.window_manager.keyconfigs.active.name)
# if not text:
# text = "Blender (default)"
row.menu("USERPREF_MT_keyconfigs", text="Preset")
class USERPREF_PT_interface(bpy.types.Panel):

View File

@@ -124,7 +124,7 @@ def _merge_keymaps(kc1, kc2):
return merged_keymaps
class PREFS_MT_keyconfigs(bpy.types.Menu):
class USERPREF_MT_keyconfigs(bpy.types.Menu):
bl_label = "KeyPresets"
preset_subdir = "keyconfig"
preset_operator = "wm.keyconfig_activate"
@@ -384,7 +384,7 @@ class InputKeyMapPanel(bpy.types.Panel):
text = bpy.path.display_name(context.window_manager.keyconfigs.active.name)
if not text:
text = "Blender (default)"
row.menu("PREFS_MT_keyconfigs", text=text)
row.menu("USERPREF_MT_keyconfigs", text=text)
row.operator("wm.keyconfig_preset_add", text="", icon="ZOOMIN")
row.operator("wm.keyconfig_preset_add", text="", icon="ZOOMOUT").remove_active = True

View File

@@ -1153,7 +1153,6 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *arg_unuse
uiStyle *style= U.uistyles.first;
struct RecentFile *recent;
int i;
Menu menu= {0};
MenuType *mt= WM_menutype_find("USERPREF_MT_splash", TRUE);
char url[64];
@@ -1193,9 +1192,13 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *arg_unuse
uiBlockSetEmboss(block, UI_EMBOSS);
/* show the splash menu (containing interaction presets), using python */
if (mt) {
Menu menu= {0};
menu.layout= layout;
menu.type= mt;
mt->draw(C, &menu);
// wmWindowManager *wm= CTX_wm_manager(C);
// uiItemM(layout, C, "USERPREF_MT_keyconfigs", U.keyconfigstr, 0);
}
uiBlockSetEmboss(block, UI_EMBOSSP);