PyAPI: Support for custom tool registration

Added a module bpy.utils.toolsystem which only exposes ToolDef,
to avoid scripts referencing bl_ui internals.
This commit is contained in:
2018-10-18 16:46:43 +11:00
parent 321c8232bc
commit 108475dc01
4 changed files with 101 additions and 2 deletions

View File

@@ -348,8 +348,7 @@ class ToolSelectPanelHelper:
for item in cls._tools_flatten_with_keymap(tools):
keymap_data = item.keymap
if callable(keymap_data[0]):
text = item.text
cls._km_action_simple(kc, context_descr, text, keymap_data)
cls._km_action_simple(kc, context_descr, item.text, keymap_data)
@classmethod
def keymap_ui_hierarchy(cls, context_mode):