Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions RightMouseNavigation.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import bpy
from bpy.types import Operator
import ctypes
import sys
import platform


class RMN_OT_right_mouse_navigation(Operator):
Expand Down Expand Up @@ -79,9 +78,6 @@ def reset_cursor():
if space_type == 'VIEW_3D' or space_type == 'NODE_EDITOR' and enable_nodes:
if event.type in {'RIGHTMOUSE'}:
if event.value in {'RELEASE'}:
if sys.platform.startswith('win'):
# This fakes a Right Mouse Up event using Ctypes
ctypes.windll.user32.mouse_event(self.MOUSE_RIGHTUP)
# This brings back our mouse cursor to use with the menu
context.window.cursor_modal_restore()
# If the length of time you've been holding down
Expand Down
14 changes: 7 additions & 7 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,7 @@ def unregister():

wm = bpy.context.window_manager
active_kc = wm.keyconfigs.active

for key in active_kc.keymaps['Node Editor'].keymap_items:
if (key.idname == 'rmn.right_mouse_navigation'):
active_kc.keymaps['Node Editor'].keymap_items.remove(key)

addon_keymaps.clear()
addon_kc = wm.keyconfigs.addon

menumodes = ["Object Mode", "Mesh", "Curve", "Armature",
"Metaball", "Lattice", "Font", "Pose", "Node Editor"]
Expand Down Expand Up @@ -133,6 +128,11 @@ def unregister():
key.type = "LEFTMOUSE"
key.value = "PRESS"

for km in addon_kc.keymaps:
for kmi in km.keymap_items:
km.keymap_items.remove(kmi)
addon_keymaps.clear()


if __name__ == "__package__":
if __name__ == "__main__":
register()
65 changes: 4 additions & 61 deletions blender_manifest.toml
Original file line number Diff line number Diff line change
@@ -1,73 +1,16 @@
schema_version = "1.0.0"

# Example of manifest file for a Blender extension
# Change the values according to your extension
id = "right_mouse_navigation"
version = "2.3.4"
version = "2.3.8"
name = "Right Mouse Navigation"
tagline = "Game Engine-style viewport & node graph navigation"
tagline = "Game Engine-style Viewport & Node Navigation"
maintainer = "Spectral Vectors"
# Supported types: "add-on", "theme"
type = "add-on"

# Optional link to documentation, support, source files, etc
website = "https://github.com/SpectralVectors/RightMouseNavigation"

# Optional list defined by Blender and server, see:
# https://docs.blender.org/manual/en/dev/advanced/extensions/tags.html
tags = ["Animation", "Sequencer"]
tags = ["3D View", "Node", "User Interface"]

blender_version_min = "4.2.0"
# # Optional: Blender version that the extension does not support, earlier versions are supported.
# # This can be omitted and defined later on the extensions platform if an issue is found.
# blender_version_max = "5.1.0"

# License conforming to https://spdx.org/licenses/ (use "SPDX: prefix)
# https://docs.blender.org/manual/en/dev/advanced/extensions/licenses.html
license = [
"SPDX:GPL-2.0-or-later",
]
# Optional: required by some licenses.
# copyright = [
# "2002-2024 Developer Name",
# "1998 Company Name",
# ]

# Optional list of supported platforms. If omitted, the extension will be available in all operating systems.
# platforms = ["windows-x64", "macos-arm64", "linux-x64"]
# Other supported platforms: "windows-arm64", "macos-x64"

# Optional: bundle 3rd party Python modules.
# https://docs.blender.org/manual/en/dev/advanced/extensions/python_wheels.html
# wheels = [
# "./wheels/hexdump-3.3-py3-none-any.whl",
# "./wheels/jsmin-3.0.1-py3-none-any.whl",
# ]

# # Optional: add-ons can list which resources they will require:
# # * files (for access of any filesystem operations)
# # * network (for internet access)
# # * clipboard (to read and/or write the system clipboard)
# # * camera (to capture photos and videos)
# # * microphone (to capture audio)
# #
# # If using network, remember to also check `bpy.app.online_access`
# # https://docs.blender.org/manual/en/dev/advanced/extensions/addons.html#internet-access
# #
# # For each permission it is important to also specify the reason why it is required.
# # Keep this a single short sentence without a period (.) at the end.
# # For longer explanations use the documentation or detail page.
#
# [permissions]
# network = "Need to sync motion-capture data to server"
# files = "Import/export FBX from/to disk"
# clipboard = "Copy and paste bone transforms"

# Optional: build settings.
# https://docs.blender.org/manual/en/dev/advanced/extensions/command_line_arguments.html#command-line-args-extension-build
# [build]
# paths_exclude_pattern = [
# "__pycache__/",
# "/.git/",
# "/*.zip",
# ]
license = ["SPDX:GPL-2.0-or-later"]