Fix error keymap conflict operator
Detecting conflicts was failing because of an undefined function call & an unknown "Timeline" keymap in the keymap hierarchy.
This commit is contained in:
parent
630455d686
commit
4210a4f1cf
@ -141,7 +141,6 @@ _km_hierarchy = [
|
||||
('NLA Tracks', 'NLA_EDITOR', 'WINDOW', []),
|
||||
('NLA Generic', 'NLA_EDITOR', 'WINDOW', []),
|
||||
]),
|
||||
('Timeline', 'TIMELINE', 'WINDOW', []),
|
||||
|
||||
('Image', 'IMAGE_EDITOR', 'WINDOW', [
|
||||
# Image (reverse order, UVEdit before Image).
|
||||
|
@ -70,6 +70,14 @@ def addon_keymap_unregister(keymap_data):
|
||||
# Utility Functions
|
||||
|
||||
def keyconfig_test(kc):
|
||||
from bl_keymap_utils.io import kmi_args_as_data
|
||||
|
||||
def _kmistr(kmi, is_modal):
|
||||
if is_modal:
|
||||
kmi_id = kmi.propvalue
|
||||
else:
|
||||
kmi_id = kmi.idname
|
||||
return "{:s}({:s})".format(kmi_id, kmi_args_as_data(kmi))
|
||||
|
||||
def testEntry(kc, entry, src=None, parent=None):
|
||||
result = False
|
||||
@ -86,9 +94,9 @@ def keyconfig_test(kc):
|
||||
for item in km.keymap_items:
|
||||
if src.compare(item):
|
||||
print("===========")
|
||||
print(parent.name)
|
||||
print(parent.name, "[parent]")
|
||||
print(_kmistr(src, is_modal).strip())
|
||||
print(km.name)
|
||||
print(km.name, "[child]")
|
||||
print(_kmistr(item, is_modal).strip())
|
||||
result = True
|
||||
|
||||
@ -105,7 +113,7 @@ def keyconfig_test(kc):
|
||||
item = km.keymap_items[j + i + 1]
|
||||
if src.compare(item):
|
||||
print("===========")
|
||||
print(km.name)
|
||||
print(km.name, "[self confict]")
|
||||
print(_kmistr(src, is_modal).strip())
|
||||
print(_kmistr(item, is_modal).strip())
|
||||
result = True
|
||||
|
Loading…
x
Reference in New Issue
Block a user