Skip to content

Commit

Permalink
Issue vilemduha#243 error on no active object
Browse files Browse the repository at this point in the history
  • Loading branch information
eastshores committed Oct 30, 2023
1 parent 8c9da47 commit a9ba474
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/addons/cam/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit a9ba474

Please sign in to comment.