[Bf-blender-cvs] [3d92afca7eb] blender2.8: Fix tool-system popup and tips w/ empty keymap
Campbell Barton
noreply at git.blender.org
Mon Nov 19 01:58:26 CET 2018
Commit: 3d92afca7eb1f9c99fa0616dfbb6c264e7002f80
Author: Campbell Barton
Date: Mon Nov 19 11:56:22 2018 +1100
Branches: blender2.8
https://developer.blender.org/rB3d92afca7eb1f9c99fa0616dfbb6c264e7002f80
Fix tool-system popup and tips w/ empty keymap
That this looks like an issue loading keymaps correctly,
needs to be investigated.
===================================================================
M release/scripts/startup/bl_ui/space_toolsystem_common.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_toolsystem_common.py b/release/scripts/startup/bl_ui/space_toolsystem_common.py
index 24195dcf4dc..5eb34810011 100644
--- a/release/scripts/startup/bl_ui/space_toolsystem_common.py
+++ b/release/scripts/startup/bl_ui/space_toolsystem_common.py
@@ -688,7 +688,8 @@ def description_from_name(context, space_type, text, *, use_operator=True):
if operator is None:
if item.keymap is not None:
- operator = item.keymap[0].keymap_items[0].idname
+ if item.keymap[0].keymap_items:
+ operator = item.keymap[0].keymap_items[0].idname
if operator is not None:
import _bpy
@@ -880,12 +881,16 @@ def keymap_from_context(context, space_type):
context='INVOKE_REGION_WIN',
)[1]
elif item.keymap is not None:
- kmi_first = item.keymap[0].keymap_items[0]
- kmi_found = wm.keyconfigs.find_item_from_operator(
- idname=kmi_first.idname,
- # properties=kmi_first.properties, # prevents matches, don't use.
- context='INVOKE_REGION_WIN',
- )[1]
+ kmi_first = item.keymap[0].keymap_items
+ kmi_first = kmi_first[0] if kmi_first else None
+ if kmi_first is not None:
+ kmi_found = wm.keyconfigs.find_item_from_operator(
+ idname=kmi_first.idname,
+ # properties=kmi_first.properties, # prevents matches, don't use.
+ context='INVOKE_REGION_WIN',
+ )[1]
+ else:
+ kmi_found = None
del kmi_first
else:
kmi_found = None
More information about the Bf-blender-cvs
mailing list