mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Keymap: skip loading the keymap preset in background mode
Caused a crash on exit and isn't needed.
This commit is contained in:
parent
3064da1200
commit
04cdf8d040
1 changed files with 13 additions and 9 deletions
|
|
@ -146,6 +146,7 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
|
|||
"""
|
||||
use_time = use_class_register_check = _bpy.app.debug_python
|
||||
use_user = not _is_factory_startup
|
||||
is_background = _bpy.app.background
|
||||
|
||||
if use_time:
|
||||
import time
|
||||
|
|
@ -261,17 +262,20 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
|
|||
_addon_utils.reset_all(reload_scripts=reload_scripts)
|
||||
del _initialize
|
||||
|
||||
# Load the default key configuration.
|
||||
filepath = preset_find("blender", "keyconfig")
|
||||
if filepath:
|
||||
keyconfig_set(filepath)
|
||||
if not is_background:
|
||||
# Load the default key configuration.
|
||||
filepath = preset_find("blender", "keyconfig")
|
||||
if filepath:
|
||||
keyconfig_set(filepath)
|
||||
|
||||
# run the active integration preset
|
||||
filepath = preset_find(_user_preferences.inputs.active_keyconfig,
|
||||
"keyconfig")
|
||||
# run the active integration preset
|
||||
filepath = preset_find(
|
||||
_user_preferences.inputs.active_keyconfig,
|
||||
"keyconfig",
|
||||
)
|
||||
|
||||
if filepath:
|
||||
keyconfig_set(filepath)
|
||||
if filepath:
|
||||
keyconfig_set(filepath)
|
||||
|
||||
if reload_scripts:
|
||||
import gc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue