Skip to content

Commit

Permalink
Merge pull request #117 from eastshores/master
Browse files Browse the repository at this point in the history
Issue vilemduha#243 error on no active object
  • Loading branch information
pppalain authored Oct 31, 2023
2 parents aecdffd + a9ba474 commit 93a794c
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 93a794c

Please sign in to comment.