Fix error generating toolbar tooltip

C code needed to be updated for module move.
This commit is contained in:
Campbell Barton 2018-11-20 21:34:29 +11:00
parent 789a259d71
commit 057ba2eb68
Notes: blender-bot 2023-02-14 11:08:33 +01:00
Referenced by issue #57953, Assert failure when trying to display tool tooltip
2 changed files with 2 additions and 3 deletions

View File

@ -29,7 +29,6 @@ __all__ = (
"activate_by_name_or_cycle",
"description_from_name",
"keymap_from_name",
"keymap_from_context",
)
# Support reloading icons.

View File

@ -500,10 +500,10 @@ static uiTooltipData *ui_tooltip_data_from_tool(bContext *C, uiBut *but, bool is
{
/* Generate keymap in order to inspect it.
* Note, we could make a utility to avoid the keymap generation part of this. */
const char *expr_imports[] = {"bpy", "bl_ui", NULL};
const char *expr_imports[] = {"bpy", "bl_keymap_utils", "bl_keymap_utils.keymap_from_toolbar", NULL};
const char *expr = (
"getattr("
"bl_ui.space_toolsystem_common.keymap_from_context("
"bl_keymap_utils.keymap_from_toolbar.generate("
"bpy.context, "
"bpy.context.space_data.type), "
"'as_pointer', lambda: 0)()");