Implement keymap presets

This commit is contained in:
JannisX11 2021-06-16 23:31:02 +02:00
parent dc25b713d5
commit 1b25a426e1
11 changed files with 924 additions and 40 deletions

View File

@ -645,9 +645,7 @@ onVueSetup(function() {
let unit_size = Math.clamp(max-min, min_size, 1e4);
this.graph_size = (clientHeight - 2*padding) / unit_size;
let blend = Math.clamp(1 - (max-min) / min_size, 0, 1)
console.log(blend)
this.graph_offset = clientHeight - padding + (this.graph_size * (min - unit_size/2 * blend ) );
console.log(this.graph_size, clientHeight, padding, min, max)
let string = '';
points.forEach((value, i) => {

View File

@ -2107,26 +2107,6 @@ const Keybinds = {
},
save() {
localStorage.setItem('keybindings', JSON.stringify(Keybinds.stored))
},
reset() {
let answer = confirm(tl('message.reset_keybindings'));
if (!answer) return;
for (var category in Keybinds.structure) {
var entries = Keybinds.structure[category].actions
if (entries && entries.length) {
entries.forEach(function(item) {
if (item.keybind) {
if (item.default_keybind) {
item.keybind.set(item.default_keybind);
} else {
item.keybind.clear();
}
item.keybind.save(false)
}
})
}
}
Keybinds.save()
}
}
if (localStorage.getItem('keybindings')) {

View File

@ -390,13 +390,12 @@ function resizeWindow(event) {
if (!Preview.all || (event && event.target && event.target !== window)) {
return;
}
if (Animator.open) {
Timeline.updateSize()
}
if (Interface.data) {
updateInterfacePanels()
}
if (Animator.open) {
Timeline.updateSize()
}
Preview.all.forEach(function(prev) {
if (prev.canvas.isConnected) {
prev.resize()

View File

@ -242,6 +242,42 @@ class Keybind {
return this.label
}
}
Keybinds.loadKeymap = function(id) {
let answer = confirm(tl('message.load_keymap'));
if (!answer) return;
let preset = KeymapPresets[id];
Keybinds.actions.forEach(item => {
if (!item.keybind) return;
if (preset && preset.keys[item.id] !== undefined) {
if (preset.keys[item.id] == null) {
item.keybind.clear();
} else {
item.keybind.set(preset.keys[item.id]).save(false);
}
} else {
if (item.default_keybind) {
item.keybind.set(item.default_keybind);
} else {
item.keybind.clear();
}
}
item.keybind.save(false);
})
if (id == 'mouse') {
Keybinds.extra.preview_rotate.keybind.set({key: 2}).save(false);
Keybinds.extra.preview_drag.keybind.set({key: 2, shift: true}).save(false);
Keybinds.extra.preview_zoom.keybind.set({key: 2, ctrl: true}).save(false);
}
Keybinds.save();
TickUpdates.keybind_conflicts = true;
}
Keybinds.no_overlap = function(k1, k2) {
if (typeof k1.condition !== 'object' || typeof k2.condition !== 'object') return false;
if (k1.condition.modes && k2.condition.modes && k1.condition.modes.overlap(k2.condition.modes) == 0) return true;
@ -360,10 +396,28 @@ onVueSetup(function() {
BARS.defineActions(() => {
new Action('load_keymap', {
icon: 'format_list_bulleted',
category: 'blockbench',
work_in_dialog: true,
click(e) {
new Menu(this.children).open(e.target);
},
children: [
'import_keymap',
'_',
{icon: 'keyboard', id: 'default', name: 'Default (Trackpad)', click() {Keybinds.loadKeymap('default')}},
{icon: 'keyboard', id: 'mouse', name: 'Default (Mouse)', click() {Keybinds.loadKeymap('mouse')}},
{icon: 'keyboard', id: 'blender', name: 'Blender', click() {Keybinds.loadKeymap('blender')}},
{icon: 'keyboard', id: 'cinema4d', name: 'Cinema 4D', click() {Keybinds.loadKeymap('cinema4d')}},
{icon: 'keyboard', id: 'maya', name: 'Maya', click() {Keybinds.loadKeymap('maya')}}
]
})
new Action('import_keymap', {
icon: 'folder',
category: 'blockbench',
click: function () {
work_in_dialog: true,
click() {
Blockbench.import({
resource_id: 'config',
extensions: ['bbkeymap'],
@ -386,7 +440,8 @@ BARS.defineActions(() => {
new Action('export_keymap', {
icon: 'keyboard_hide',
category: 'blockbench',
click: async function () {
work_in_dialog: true,
click() {
var keys = {}
for (var key in Keybinds.stored) {
@ -404,15 +459,8 @@ BARS.defineActions(() => {
})
}
})
new Action('reset_keybindings', {
icon: 'replay',
category: 'blockbench',
work_in_dialog: true,
click: function () {Keybinds.reset()}
})
BarItems.import_keymap.toElement('#keybinds_title_bar')
BarItems.load_keymap.toElement('#keybinds_title_bar')
BarItems.export_keymap.toElement('#keybinds_title_bar')
BarItems.reset_keybindings.toElement('#keybinds_title_bar')
})

File diff suppressed because one or more lines are too long

275
keymaps/blender.bbkeymap Normal file
View File

@ -0,0 +1,275 @@
{
"keys": {
"reload": {"key": 116},
"fill_tool": null,
"apply_display_preset": null,
"preview_rotate": {"key": 2},
"preview_drag": {"key": 2, "shift": true},
"resolve_keyframe_expressions": null,
"preview_select": {"key": 1},
"confirm": {"key": 13},
"cancel": {"key": 27},
"start": null,
"edit": {"key": 49},
"paint": {"key": 50},
"display": {"key": 51},
"animate": {"key": 52},
"move_tool": {"key": 71},
"resize_tool": {"key": 83},
"rotate_tool": {"key": 82},
"pivot_tool": {"key": 80},
"vertex_snap_tool": {"key": 88},
"swap_tools": {"key": 32},
"brush_tool": {"key": 66},
"eraser": {"key": 69, "ctrl": true},
"color_picker": {"key": 69},
"draw_shape_tool": {"key": 85},
"copy_paste_tool": {"key": 77},
"clone_brush": null,
"vertex_snap_mode": null,
"rename": {"key": 113},
"delete": {"key": 46},
"duplicate": {"key": 68, "shift": true},
"copy": {"key": 67, "ctrl": true},
"cut": {"key": 88, "ctrl": true},
"paste": {"key": 86, "ctrl": true},
"undo": {"key": 90, "ctrl": true},
"redo": {"key": 90, "ctrl": true, "shift": true},
"outliner_toggle": {"key": 115},
"sort_outliner": null,
"unlock_everything": null,
"element_colors": null,
"select_window": {"key": 70, "ctrl": true},
"invert_selection": {"key": 73, "ctrl": true},
"select_all": {"key": 65},
"add_group": {"key": 71, "ctrl": true},
"collapse_groups": null,
"add_cube": {"key": 78, "ctrl": true},
"add_locator": null,
"toggle_skin_layer": null,
"open_model_folder": null,
"open_backup_folder": null,
"project_window": null,
"close_project": null,
"convert_project": null,
"open_model": {"key": 79, "ctrl": true},
"add_model": null,
"extrude_texture": null,
"export_over": {"key": 83, "ctrl": true},
"upload_sketchfab": null,
"save_project": {"key": 83, "ctrl": true, "alt": true},
"save_project_as": {"key": 83, "ctrl": true, "shift": true, "alt": true},
"export_blockmodel": null,
"export_bedrock": null,
"export_entity": null,
"export_obj": null,
"export_gltf": null,
"export_class_entity": null,
"export_optifine_full": null,
"export_optifine_part": null,
"import_optifine_part": null,
"import_csmodel": null,
"export_csmodel": null,
"settings_window": null,
"update_window": null,
"reset_keybindings": null,
"action_control": {"key": 70},
"import_theme": null,
"export_theme": null,
"reset_theme": null,
"reset_layout": null,
"edit_session": null,
"toggle_chat": null,
"uv_dialog": null,
"uv_dialog_full": null,
"plugins_window": null,
"reload_plugins": {"key": 74, "ctrl": true},
"load_plugin": null,
"load_plugin_from_url": null,
"fullscreen": {"key": 122},
"zoom_in": null,
"zoom_out": null,
"zoom_reset": null,
"toggle_wireframe": {"key": 90},
"preview_checkerboard": null,
"uv_checkerboard": null,
"toggle_shading": {"key": 90},
"screenshot_model": {"key": 80, "ctrl": true},
"record_model_gif": null,
"timelapse": null,
"screenshot_app": null,
"toggle_quad_view": {"key": 81, "ctrl": true, "alt": true},
"focus_on_selection": {"key": 110},
"toggle_camera_projection": {"key": 101},
"camera_initial": {"key": 97},
"camera_top": {"key": 104},
"camera_bottom": {"key": 98},
"camera_south": {"key": 100},
"camera_north": {"key": 102},
"camera_east": {"key": 103},
"camera_west": {"key": 105},
"painting_grid": {"key": 71, "shift": true},
"cube_counter": null,
"gui_light": null,
"timeline_focus": null,
"open_particle_graphics_generator": null,
"save_start": null,
"export_animation": null,
"open_seat_position": null,
"share_on_pastebin": null,
"language_downloader": null,
"generate_optifine_template": null,
"Bedrock Entity Generator": null,
"transform_space": null,
"rotation_space": null,
"slider_pos_x": null,
"slider_pos_y": null,
"slider_pos_z": null,
"slider_size_x": null,
"slider_size_y": null,
"slider_size_z": null,
"slider_inflate": null,
"slider_rotation_x": null,
"slider_rotation_y": null,
"slider_rotation_z": null,
"slider_origin_x": null,
"slider_origin_y": null,
"slider_origin_z": null,
"scale": null,
"rotate_x_cw": null,
"rotate_x_ccw": null,
"rotate_y_cw": null,
"rotate_y_ccw": null,
"rotate_z_cw": null,
"rotate_z_ccw": null,
"flip_x": null,
"flip_y": null,
"flip_z": null,
"center_x": null,
"center_y": null,
"center_z": null,
"center_all": null,
"move_up": {"key": 38},
"move_down": {"key": 40},
"move_left": {"key": 37},
"move_right": {"key": 39},
"move_forth": {"key": 33},
"move_back": {"key": 34},
"toggle_visibility": {"key": 72},
"toggle_locked": null,
"toggle_export": null,
"toggle_autouv": null,
"toggle_shade": null,
"toggle_mirror_uv": null,
"update_autouv": null,
"origin_to_geometry": null,
"rescale_toggle": null,
"bone_reset_toggle": null,
"move_keyframe_back": {"key": 37},
"move_keyframe_forth": {"key": 39},
"remove_blank_faces": null,
"import_texture": {"key": 84, "ctrl": true},
"create_texture": {"key": 84, "ctrl": true, "shift": true},
"save_textures": {"key": 83, "alt": true},
"change_textures_folder": null,
"animated_textures": null,
"uv_rotation": null,
"uv_grid": null,
"uv_select_all": null,
"uv_maximize": null,
"uv_turn_mapping": null,
"uv_auto": null,
"uv_rel_auto": null,
"uv_mirror_x": null,
"uv_mirror_y": null,
"uv_transparent": {"key": 88, "alt": true},
"uv_reset": null,
"uv_apply_all": null,
"cullface": null,
"auto_cullface": null,
"face_tint": null,
"slider_face_tint": null,
"toggle_uv_overlay": null,
"draw_shape_type": null,
"fill_mode": null,
"mirror_painting": null,
"lock_alpha": null,
"slider_brush_size": null,
"slider_brush_softness": null,
"slider_brush_opacity": null,
"add_to_palette": null,
"import_palette": null,
"export_palette": null,
"generate_palette": null,
"sort_palette": null,
"load_palette": null,
"slider_color_h": null,
"slider_color_s": null,
"slider_color_v": null,
"add_display_preset": null,
"add_animation": null,
"load_animation_file": null,
"export_animation_file": null,
"play_animation": {"key": 32},
"slider_animation_length": null,
"slider_animation_speed": null,
"slider_keyframe_time": null,
"reset_keyframe": null,
"change_keyframe_file": null,
"reverse_keyframes": null,
"previous_keyframe": null,
"next_keyframe": null,
"add_keyframe": {"key": 73},
"add_marker": {"key": 77},
"bring_up_all_animations": null,
"fold_all_animations": null,
"clear_timeline": null,
"select_effect_animator": null,
"plaster": null,
"upload_light_tracer": null,
"export_rp": null,
"record_image_sequence": null,
"open_code_view": null,
"persona_copy_texture": null,
"persona_export_dev_package": null,
"persona_export_package": null,
"edit_persona_zones": null,
"generate_persona_tintmap": null,
"persona_texture_mode": null,
"create_outline": null,
"jump_to_timeline_start": {"key": 36},
"jump_to_timeline_end": {"key": 35},
"hide_everything_except_selection": {"key": 220},
"theme_window": null,
"keybindings_window": null,
"animated_texture_frame": null,
"edit_material_instances": null,
"add_null_object": null,
"explode_skin_model": null,
"import_project": null,
"import_java_block_model": null,
"export_minecraft_skin": null,
"import_settings": null,
"export_settings": null,
"open_dev_tools": {"key": 73, "ctrl": true, "shift": true},
"share_model": null,
"persona_validate": null,
"new_bedrock_entity": null,
"generate_shape": null,
"bedrockentitygenerator": null,
"toggle_motion_trails": null,
"generate_player_statue": null,
"save_all_animations": null,
"ik_enabled": null,
"slider_ik_chain_length": null,
"lock_motion_trail": null,
"keyframe_interpolation": {"key": 84},
"timeline_graph_editor": {"key": 114},
"timeline_frame_back": {"key": 188},
"timeline_frame_forth": {"key": 190},
"bake_animations": null,
"import_keymap": null,
"export_keymap": null,
"view_mode": {"key": 90, "shift": true}
}
}

285
keymaps/cinema4d.bbkeymap Normal file
View File

@ -0,0 +1,285 @@
{
"keys": {
"reload": null,
"fill_tool": null,
"apply_display_preset": null,
"preview_rotate": {"key": 1, "alt": true},
"preview_drag": {"key": 2, "alt": true},
"resolve_keyframe_expressions": null,
"preview_select": {"key": 1},
"confirm": {"key": 13},
"cancel": {"key": 27},
"start": null,
"edit": {"key": 49},
"paint": {"key": 50},
"display": {"key": 51},
"animate": {"key": 52},
"move_tool": {"key": 69},
"resize_tool": {"key": 84},
"rotate_tool": {"key": 82},
"pivot_tool": {"key": 80},
"vertex_snap_tool": {"key": 88},
"swap_tools": {"key": 32},
"brush_tool": {"key": 66},
"eraser": null,
"color_picker": null,
"draw_shape_tool": {"key": 85},
"copy_paste_tool": {"key": 77},
"clone_brush": null,
"vertex_snap_mode": null,
"rename": {"key": 113},
"delete": {"key": 46},
"duplicate": null,
"copy": {"key": 67, "ctrl": true},
"cut": {"key": 88, "ctrl": true},
"paste": {"key": 86, "ctrl": true},
"undo": {"key": 90, "ctrl": true},
"redo": {"key": 90, "shift": true},
"outliner_toggle": {"key": 115},
"sort_outliner": null,
"unlock_everything": null,
"element_colors": null,
"select_window": {"key": 70, "ctrl": true},
"invert_selection": {"key": 73, "ctrl": true},
"select_all": {"key": 65, "ctrl": true},
"add_group": {"key": 71, "shift": true},
"collapse_groups": null,
"add_cube": null,
"add_locator": null,
"toggle_skin_layer": null,
"open_model_folder": null,
"open_backup_folder": null,
"project_window": {"key": 68, "ctrl": true},
"close_project": {"key": 87, "ctrl": true, "shift": true},
"convert_project": null,
"open_model": {"key": 79, "ctrl": true},
"add_model": null,
"extrude_texture": null,
"export_over": {"key": 83, "ctrl": true},
"upload_sketchfab": null,
"save_project": {"key": 83, "ctrl": true, "alt": true},
"save_project_as": {"key": 83, "ctrl": true, "shift": true, "alt": true},
"export_blockmodel": null,
"export_bedrock": null,
"export_entity": null,
"export_obj": null,
"export_gltf": null,
"export_class_entity": null,
"export_optifine_full": null,
"export_optifine_part": null,
"import_optifine_part": null,
"import_csmodel": null,
"export_csmodel": null,
"settings_window": null,
"update_window": null,
"reset_keybindings": null,
"action_control": {"key": 112},
"import_theme": null,
"export_theme": null,
"reset_theme": null,
"reset_layout": null,
"edit_session": null,
"toggle_chat": null,
"uv_dialog": null,
"uv_dialog_full": null,
"plugins_window": null,
"reload_plugins": {"key": 74, "ctrl": true},
"load_plugin": null,
"load_plugin_from_url": null,
"fullscreen": {"key": 122},
"zoom_in": {"key": 187},
"zoom_out": {"key": 189},
"zoom_reset": null,
"toggle_wireframe": {"key": 90},
"preview_checkerboard": null,
"uv_checkerboard": null,
"toggle_shading": null,
"screenshot_model": {"key": 80, "ctrl": true},
"record_model_gif": null,
"timelapse": null,
"screenshot_app": null,
"toggle_quad_view": {"key": 116},
"focus_on_selection": {"key": 70},
"toggle_camera_projection": {"key": 101},
"camera_initial": {"key": 97},
"camera_top": {"key": 104},
"camera_bottom": {"key": 98},
"camera_south": {"key": 100},
"camera_north": {"key": 102},
"camera_east": {"key": 103},
"camera_west": {"key": 105},
"painting_grid": {"key": 71},
"cube_counter": null,
"gui_light": null,
"timeline_focus": null,
"open_particle_graphics_generator": null,
"save_start": null,
"export_animation": null,
"open_seat_position": null,
"share_on_pastebin": null,
"language_downloader": null,
"generate_optifine_template": null,
"Bedrock Entity Generator": null,
"transform_space": null,
"rotation_space": null,
"slider_pos_x": null,
"slider_pos_y": null,
"slider_pos_z": null,
"slider_size_x": null,
"slider_size_y": null,
"slider_size_z": null,
"slider_inflate": null,
"slider_rotation_x": null,
"slider_rotation_y": null,
"slider_rotation_z": null,
"slider_origin_x": null,
"slider_origin_y": null,
"slider_origin_z": null,
"scale": null,
"rotate_x_cw": null,
"rotate_x_ccw": null,
"rotate_y_cw": null,
"rotate_y_ccw": null,
"rotate_z_cw": null,
"rotate_z_ccw": null,
"flip_x": null,
"flip_y": null,
"flip_z": null,
"center_x": null,
"center_y": null,
"center_z": null,
"center_all": null,
"move_up": {"key": 38},
"move_down": {"key": 40},
"move_left": {"key": 37},
"move_right": {"key": 39},
"move_forth": {"key": 33},
"move_back": {"key": 34},
"toggle_visibility": null,
"toggle_locked": null,
"toggle_export": null,
"toggle_autouv": null,
"toggle_shade": null,
"toggle_mirror_uv": null,
"update_autouv": null,
"origin_to_geometry": null,
"rescale_toggle": null,
"bone_reset_toggle": null,
"move_keyframe_back": {"key": 37},
"move_keyframe_forth": {"key": 39},
"remove_blank_faces": null,
"import_texture": {"key": 84, "ctrl": true},
"create_texture": {"key": 84, "ctrl": true, "shift": true},
"save_textures": null,
"change_textures_folder": null,
"animated_textures": null,
"uv_rotation": null,
"uv_grid": null,
"uv_select_all": null,
"uv_maximize": null,
"uv_turn_mapping": null,
"uv_auto": null,
"uv_rel_auto": null,
"uv_mirror_x": null,
"uv_mirror_y": null,
"uv_transparent": null,
"uv_reset": null,
"uv_apply_all": null,
"cullface": null,
"auto_cullface": null,
"face_tint": null,
"slider_face_tint": null,
"toggle_uv_overlay": null,
"draw_shape_type": null,
"fill_mode": null,
"mirror_painting": null,
"lock_alpha": null,
"slider_brush_size": null,
"slider_brush_softness": null,
"slider_brush_opacity": null,
"add_to_palette": null,
"import_palette": null,
"export_palette": null,
"generate_palette": null,
"sort_palette": null,
"load_palette": null,
"slider_color_h": null,
"slider_color_s": null,
"slider_color_v": null,
"add_display_preset": null,
"add_animation": null,
"load_animation_file": null,
"export_animation_file": null,
"play_animation": {"key": 32},
"slider_animation_length": null,
"slider_animation_speed": null,
"slider_keyframe_time": null,
"reset_keyframe": null,
"change_keyframe_file": null,
"reverse_keyframes": null,
"previous_keyframe": {"key": 70, "ctrl": true},
"next_keyframe": {"key": 71, "ctrl": true},
"add_keyframe": {"key": 73},
"add_marker": {"key": 77, "ctrl": true},
"bring_up_all_animations": null,
"fold_all_animations": null,
"clear_timeline": null,
"select_effect_animator": null,
"plaster": null,
"upload_light_tracer": null,
"export_rp": null,
"record_image_sequence": null,
"open_code_view": null,
"persona_copy_texture": null,
"persona_export_dev_package": null,
"persona_export_package": null,
"edit_persona_zones": null,
"generate_persona_tintmap": null,
"persona_texture_mode": null,
"create_outline": null,
"jump_to_timeline_start": {"key": 70, "shift": true},
"jump_to_timeline_end": {"key": 35},
"hide_everything_except_selection": {"key": 73},
"theme_window": null,
"keybindings_window": null,
"animated_texture_frame": null,
"edit_material_instances": null,
"add_null_object": null,
"explode_skin_model": null,
"import_project": null,
"import_java_block_model": null,
"export_minecraft_skin": null,
"import_settings": null,
"export_settings": null,
"open_dev_tools": {"key": 73, "ctrl": true, "shift": true},
"share_model": null,
"persona_validate": null,
"new_bedrock_entity": null,
"generate_shape": null,
"bedrockentitygenerator": null,
"toggle_motion_trails": null,
"generate_player_statue": null,
"save_all_animations": null,
"ik_enabled": null,
"slider_ik_chain_length": null,
"lock_motion_trail": null,
"keyframe_interpolation": null,
"timeline_graph_editor": {"key": 114},
"timeline_frame_back": {"key": 188, "alt": true},
"timeline_frame_forth": {"key": 190, "alt": true},
"bake_animations": null,
"import_keymap": null,
"export_keymap": null,
"view_mode": {"key": 52},
"fabric_info": null,
"set_animation_end": {"key": 35, "ctrl": true},
"flip_animation": null,
"graph_editor_zero_line": null,
"flip_animations": null,
"edit_history": null,
"unfold_groups": null,
"edit_bedrock_binding": null,
"gradient_tool": null,
"pick_screen_color": null
}
}

286
keymaps/maya.bbkeymap Normal file
View File

@ -0,0 +1,286 @@
{
"keys": {
"reload": null,
"fill_tool": null,
"apply_display_preset": null,
"preview_rotate": {"key": 1, "alt": true},
"preview_drag": {"key": 2, "alt": true},
"preview_zoom": {"key": 3, "alt": true},
"resolve_keyframe_expressions": null,
"preview_select": {"key": 1},
"confirm": {"key": 13},
"cancel": {"key": 27},
"start": null,
"edit": null,
"paint": null,
"display": null,
"animate": null,
"move_tool": {"key": 87},
"resize_tool": {"key": 82},
"rotate_tool": {"key": 69},
"pivot_tool": {"key": 80},
"vertex_snap_tool": {"key": 88},
"swap_tools": {"key": 32},
"brush_tool": {"key": 66},
"eraser": null,
"color_picker": null,
"draw_shape_tool": {"key": 85},
"copy_paste_tool": {"key": 77},
"clone_brush": null,
"vertex_snap_mode": null,
"rename": {"key": 113},
"delete": {"key": 46},
"duplicate": {"key": 68, "ctrl": true},
"copy": {"key": 67, "ctrl": true},
"cut": {"key": 88, "ctrl": true},
"paste": {"key": 86, "ctrl": true},
"undo": {"key": 90, "ctrl": true},
"redo": {"key": 90, "shift": true},
"outliner_toggle": {"key": 115},
"sort_outliner": null,
"unlock_everything": null,
"element_colors": null,
"select_window": {"key": 70, "ctrl": true},
"invert_selection": {"key": 73, "ctrl": true},
"select_all": {"key": 65, "ctrl": true},
"add_group": {"key": 71, "ctrl": true},
"collapse_groups": null,
"add_cube": null,
"add_locator": null,
"toggle_skin_layer": null,
"open_model_folder": null,
"open_backup_folder": null,
"project_window": null,
"close_project": null,
"convert_project": null,
"open_model": {"key": 79, "ctrl": true},
"add_model": null,
"extrude_texture": null,
"export_over": {"key": 83, "ctrl": true},
"upload_sketchfab": null,
"save_project": {"key": 83, "ctrl": true, "alt": true},
"save_project_as": {"key": 83, "ctrl": true, "shift": true, "alt": true},
"export_blockmodel": null,
"export_bedrock": null,
"export_entity": null,
"export_obj": null,
"export_gltf": null,
"export_class_entity": null,
"export_optifine_full": null,
"export_optifine_part": null,
"import_optifine_part": null,
"import_csmodel": null,
"export_csmodel": null,
"settings_window": null,
"update_window": null,
"reset_keybindings": null,
"action_control": {"key": 112},
"import_theme": null,
"export_theme": null,
"reset_theme": null,
"reset_layout": null,
"edit_session": null,
"toggle_chat": null,
"uv_dialog": null,
"uv_dialog_full": null,
"plugins_window": null,
"reload_plugins": {"key": 74, "ctrl": true},
"load_plugin": null,
"load_plugin_from_url": null,
"fullscreen": {"key": 122},
"zoom_in": null,
"zoom_out": null,
"zoom_reset": null,
"toggle_wireframe": {"key": 90},
"preview_checkerboard": null,
"uv_checkerboard": null,
"toggle_shading": null,
"screenshot_model": {"key": 80, "ctrl": true},
"record_model_gif": null,
"timelapse": null,
"screenshot_app": null,
"toggle_quad_view": {"key": 9},
"focus_on_selection": {"key": 70},
"toggle_camera_projection": {"key": 101},
"camera_initial": {"key": 97},
"camera_top": {"key": 104},
"camera_bottom": {"key": 98},
"camera_south": {"key": 100},
"camera_north": {"key": 102},
"camera_east": {"key": 103},
"camera_west": {"key": 105},
"painting_grid": {"key": 71},
"cube_counter": null,
"gui_light": null,
"timeline_focus": null,
"open_particle_graphics_generator": null,
"save_start": null,
"export_animation": null,
"open_seat_position": null,
"share_on_pastebin": null,
"language_downloader": null,
"generate_optifine_template": null,
"Bedrock Entity Generator": null,
"transform_space": null,
"rotation_space": null,
"slider_pos_x": null,
"slider_pos_y": null,
"slider_pos_z": null,
"slider_size_x": null,
"slider_size_y": null,
"slider_size_z": null,
"slider_inflate": null,
"slider_rotation_x": null,
"slider_rotation_y": null,
"slider_rotation_z": null,
"slider_origin_x": null,
"slider_origin_y": null,
"slider_origin_z": null,
"scale": null,
"rotate_x_cw": null,
"rotate_x_ccw": null,
"rotate_y_cw": null,
"rotate_y_ccw": null,
"rotate_z_cw": null,
"rotate_z_ccw": null,
"flip_x": null,
"flip_y": null,
"flip_z": null,
"center_x": null,
"center_y": null,
"center_z": null,
"center_all": null,
"move_up": {"key": 38},
"move_down": {"key": 40},
"move_left": {"key": 37},
"move_right": {"key": 39},
"move_forth": {"key": 33},
"move_back": {"key": 34},
"toggle_visibility": null,
"toggle_locked": null,
"toggle_export": null,
"toggle_autouv": null,
"toggle_shade": null,
"toggle_mirror_uv": null,
"update_autouv": null,
"origin_to_geometry": null,
"rescale_toggle": null,
"bone_reset_toggle": null,
"move_keyframe_back": {"key": 37},
"move_keyframe_forth": {"key": 39},
"remove_blank_faces": null,
"import_texture": {"key": 84, "ctrl": true},
"create_texture": {"key": 84, "ctrl": true, "shift": true},
"save_textures": null,
"change_textures_folder": null,
"animated_textures": null,
"uv_rotation": null,
"uv_grid": null,
"uv_select_all": null,
"uv_maximize": null,
"uv_turn_mapping": null,
"uv_auto": null,
"uv_rel_auto": null,
"uv_mirror_x": null,
"uv_mirror_y": null,
"uv_transparent": null,
"uv_reset": null,
"uv_apply_all": null,
"cullface": null,
"auto_cullface": null,
"face_tint": null,
"slider_face_tint": null,
"toggle_uv_overlay": null,
"draw_shape_type": null,
"fill_mode": null,
"mirror_painting": null,
"lock_alpha": null,
"slider_brush_size": null,
"slider_brush_softness": null,
"slider_brush_opacity": null,
"add_to_palette": null,
"import_palette": null,
"export_palette": null,
"generate_palette": null,
"sort_palette": null,
"load_palette": null,
"slider_color_h": null,
"slider_color_s": null,
"slider_color_v": null,
"add_display_preset": null,
"add_animation": null,
"load_animation_file": null,
"export_animation_file": null,
"play_animation": {"key": 32},
"slider_animation_length": null,
"slider_animation_speed": null,
"slider_keyframe_time": null,
"reset_keyframe": null,
"change_keyframe_file": null,
"reverse_keyframes": null,
"previous_keyframe": {"key": 188},
"next_keyframe": {"key": 190},
"add_keyframe": {"key": 73},
"add_marker": {"key": 77, "ctrl": true},
"bring_up_all_animations": null,
"fold_all_animations": null,
"clear_timeline": null,
"select_effect_animator": null,
"plaster": null,
"upload_light_tracer": null,
"export_rp": null,
"record_image_sequence": null,
"open_code_view": null,
"persona_copy_texture": null,
"persona_export_dev_package": null,
"persona_export_package": null,
"edit_persona_zones": null,
"generate_persona_tintmap": null,
"persona_texture_mode": null,
"create_outline": null,
"jump_to_timeline_start": {"key": 36},
"jump_to_timeline_end": {"key": 35},
"hide_everything_except_selection": {"key": 73},
"theme_window": null,
"keybindings_window": null,
"animated_texture_frame": null,
"edit_material_instances": null,
"add_null_object": null,
"explode_skin_model": null,
"import_project": null,
"import_java_block_model": null,
"export_minecraft_skin": null,
"import_settings": null,
"export_settings": null,
"open_dev_tools": {"key": 73, "ctrl": true, "shift": true},
"share_model": null,
"persona_validate": null,
"new_bedrock_entity": null,
"generate_shape": null,
"bedrockentitygenerator": null,
"toggle_motion_trails": null,
"generate_player_statue": null,
"save_all_animations": null,
"ik_enabled": null,
"slider_ik_chain_length": null,
"lock_motion_trail": null,
"keyframe_interpolation": null,
"timeline_graph_editor": {"key": 114},
"timeline_frame_back": {"key": 188, "alt": true},
"timeline_frame_forth": {"key": 190, "alt": true},
"bake_animations": null,
"import_keymap": null,
"export_keymap": null,
"view_mode": {"key": 52},
"fabric_info": null,
"set_animation_end": {"key": 35, "ctrl": true},
"flip_animation": null,
"graph_editor_zero_line": null,
"flip_animations": null,
"edit_history": null,
"unfold_groups": null,
"edit_bedrock_binding": null,
"gradient_tool": null,
"pick_screen_color": null
}
}

View File

@ -227,7 +227,7 @@
"message.removed_faces": "Removed %0 faces",
"message.add_to_palette": "Added to palette",
"message.size_modifiers": "Hold down Ctrl or Shift to transform in smaller increments.",
"message.reset_keybindings": "Are you sure you want to reset all keybindings?",
"message.load_keymap": "Are you sure you want to load this keymap? This will overwrite your current keybindings.",
"message.no_animation_to_import": "No animations to import",
"message.wireframe.enabled": "Wireframe view enabled",
@ -813,8 +813,7 @@
"action.export_settings": "Export Settings",
"action.export_settings.desc": "Export the Blockbench settings as a .bbsettings file",
"action.reset_keybindings": "Reset Keybindings",
"action.reset_keybindings.desc": "Reset all keybindings to Blockbench's defaults",
"action.load_keymap": "Load Keymap",
"action.import_keymap": "Import Keymap",
"action.import_keymap.desc": "Import keybindings a .bbkeymap file",
"action.export_keymap": "Export Keymap",

View File

@ -1 +1,11 @@
import './languages'
import blender from './../keymaps/blender.bbkeymap';
import cinema4d from './../keymaps/cinema4d.bbkeymap';
import maya from './../keymaps/maya.bbkeymap';
window.KeymapPresets = {
blender,
cinema4d,
maya,
}

View File

@ -15,6 +15,10 @@ module.exports = {
use: {
loader: 'url-loader'
}
},
{
test: /\.bbkeymap$/,
type: 'json'
}
]
}