From a9ba47414e8b581a7e242f8ec59c0d5a974d4cb8 Mon Sep 17 00:00:00 2001 From: John Parrish Date: Mon, 30 Oct 2023 16:22:38 -0400 Subject: [PATCH] Issue #243 error on no active object --- scripts/addons/cam/ops.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/addons/cam/ops.py b/scripts/addons/cam/ops.py index 4cc9108fd..903c0c06a 100644 --- a/scripts/addons/cam/ops.py +++ b/scripts/addons/cam/ops.py @@ -575,7 +575,9 @@ def execute(self, context): fixUnits() ob = bpy.context.active_object - if ob is None: raise CamException("No object selected") + if ob is None: + self.report({'ERROR_INVALID_INPUT'}, "Please add an object to base the operation on.") + return {'CANCELLED'} minx, miny, minz, maxx, maxy, maxz = utils.getBoundsWorldspace([ob]) s.cam_operations.add()