Skip loading tool keymaps in background mode
authorCampbell Barton <ideasman42@gmail.com>
Thu, 26 Oct 2017 11:04:48 +0000 (22:04 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 26 Oct 2017 11:04:48 +0000 (22:04 +1100)
release/scripts/startup/bl_ui/space_toolsystem_common.py

index 38971f739842a255d58ab4a33fd0edd5575be7dd..bab25c3450bc2959026f38f12f0c648d19dc1a00 100644 (file)
@@ -81,6 +81,10 @@ class ToolSelectPanelHelper:
         # {tool_name: (keymap, keymap_idname, manipulator_group_idname), ...}
         cls._tool_keymap = {}
 
+        # ignore in background mode
+        if kc is None:
+            return
+
         for t in cls.tools_all():
             text, mp_idname, actions = t
             if actions is not None: