Page MenuHome

fix error removing keymap when unregistering a tool from python
AbandonedPublic

Authored by Philipp Oeser (lichtwerk) on Tue, Nov 27, 10:12 PM.

Diff Detail

Repository
rB Blender
Branch
unregister_tool_fix (branched from blender2.8)
Build Status
Buildable 2558
Build 2558: arc lint + arc unit

Event Timeline

currently you get this error when unregistering "mesh_snap_utilities_line" addon

Error: Traceback (most recent call last):
  File "/bin/2.80/scripts/modules/addon_utils.py", line 446, in disable
    mod.unregister()
  File "/bin/2.80/scripts/addons/mesh_snap_utilities_line/__init__.py", line 100, in unregister
    bpy.utils.unregister_tool('VIEW_3D', 'EDIT_MESH', tool_make_line)
  File "/bin/2.80/scripts/modules/bpy/utils/__init__.py", line 762, in unregister_tool
    kc.keymaps.remove(km)
TypeError: KeyMaps.remove(): error with argument 1, "keymap" -  Function.keymap expected a KeyMap type, not str

this should fix it?

tool registration was removed for now ( rB1b870bce85db ), so no need for this