Skip to content

Commit 0d230cc

Browse files
Add popup warning.
1 parent cf9cbec commit 0d230cc

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

RightMouseNavigation.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,16 @@ def execute(self, context):
131131
# Execute is the first thing called in our operator, so we start by
132132
# calling Blender's built-in Walk Navigation
133133
if space_type == "VIEW_3D":
134-
bpy.ops.view3d.walk("INVOKE_DEFAULT")
135-
# Adding the timer and starting the loop
136-
wm = context.window_manager
137-
self._timer = wm.event_timer_add(0.1, window=context.window)
138-
wm.modal_handler_add(self)
139-
return {"RUNNING_MODAL"}
134+
try:
135+
bpy.ops.view3d.walk("INVOKE_DEFAULT")
136+
# Adding the timer and starting the loop
137+
wm = context.window_manager
138+
self._timer = wm.event_timer_add(0.1, window=context.window)
139+
wm.modal_handler_add(self)
140+
return {"RUNNING_MODAL"}
141+
except RuntimeError:
142+
self.report({"ERROR"}, "Cannot Navigate an Object with Constraints")
143+
return {"CANCELLED"}
140144

141145
elif space_type == "NODE_EDITOR" and enable_nodes:
142146
bpy.ops.view2d.pan("INVOKE_DEFAULT")

blender_manifest.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
schema_version = "1.0.0"
22

33
id = "right_mouse_navigation"
4-
version = "2.3.9"
4+
version = "2.4.0"
55
name = "Right Mouse Navigation"
66
tagline = "Game Engine-style Viewport & Node Navigation"
77
maintainer = "Spectral Vectors and Contributors"

0 commit comments

Comments
 (0)