Skip to content

Commit ece27ae

Browse files
4.0 Compatibility Bug Fix
Fixed an error in the keymap registration that caused viewport navigation and node linking to break. Removed the deprecated node add_search menu in favor of the generic F3 search.
1 parent 6105c11 commit ece27ae

2 files changed

Lines changed: 4 additions & 12 deletions

File tree

RightMouseNavigation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def reset_cursor():
9696
def callMenu(self, context):
9797
if context.space_data.type == 'NODE_EDITOR':
9898
if context.space_data.node_tree:
99-
bpy.ops.node.add_search('INVOKE_DEFAULT')
99+
bpy.ops.wm.search_menu('INVOKE_DEFAULT')
100100
else:
101101
try:
102102
bpy.ops.wm.call_menu(name=self.menu_by_mode[context.mode])

__init__.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
'name': 'Right Mouse Navigation',
33
'category': '3D View',
44
'author': 'Spectral Vectors',
5-
'version': (2, 0, 0),
5+
'version': (2, 1, 0),
66
'blender': (2, 90, 0),
77
'location': '3D Viewport, Node Editor',
88
"description": "Enables Right Mouse Viewport Navigation"
@@ -37,23 +37,15 @@ def register_keymaps():
3737
wm = bpy.context.window_manager
3838
kc = wm.keyconfigs.user
3939

40-
km = kc.keymaps.new(
41-
name="3D View",
42-
space_type='VIEW_3D',
43-
region_type='WINDOW'
44-
)
40+
km = kc.keymaps['3D View']
4541
kmi = km.keymap_items.new(
4642
"blui.right_mouse_navigation",
4743
'RIGHTMOUSE',
4844
'PRESS'
4945
)
5046
kmi.active = True
5147

52-
km2 = kc.keymaps.new(
53-
name="Node Editor",
54-
space_type='NODE_EDITOR',
55-
region_type='WINDOW'
56-
)
48+
km2 = kc.keymaps['Node Editor']
5749
kmi2 = km2.keymap_items.new(
5850
"blui.right_mouse_navigation",
5951
'RIGHTMOUSE',

0 commit comments

Comments
 (0)