diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a32b8f..9c9b1f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog + +1.1.2: + +- fix: Breakdowner initial error check + 1.2.0: - feat: New depth move operator that handle both perspective and orthographic cam diff --git a/OP_breakdowner.py b/OP_breakdowner.py index 082c666..04a8b11 100644 --- a/OP_breakdowner.py +++ b/OP_breakdowner.py @@ -211,16 +211,23 @@ class OBJ_OT_breakdown_obj_anim(bpy.types.Operator): ## cursors ## 'DEFAULT', 'NONE', 'WAIT', 'CROSSHAIR', 'MOVE_X', 'MOVE_Y', 'KNIFE', 'TEXT', 'PAINT_BRUSH', 'PAINT_CROSS', 'DOT', 'ERASER', 'HAND', 'SCROLL_X', 'SCROLL_Y', 'SCROLL_XY', 'EYEDROPPER' ## start checks - message = None - if context.area.type != 'VIEW_3D':message = 'View3D not found, cannot run operator' + if context.area.type != 'VIEW_3D': + self.report({'WARNING'}, 'View3D not found, cannot run operator') + return {'CANCELLED'} + obj = bpy.context.object# better use self.context - if not obj:message = 'no active object' + if not obj: + self.report({'WARNING'}, 'No active object') + return {'CANCELLED'} + anim_data = obj.animation_data - if not anim_data:message = f'no animation data on obj: {obj.name}' + if not anim_data: + self.report({'WARNING'}, f'No animation data on obj: {obj.name}') + return {'CANCELLED'} + action = anim_data.action - if not action:message = f'no action on animation data of obj: {obj.name}' - if message: - self.report({'WARNING'}, message)# ERROR + if not action: + self.report({'WARNING'}, f'No action on animation data of obj: {obj.name}') return {'CANCELLED'} ## initiate variable to use diff --git a/__init__.py b/__init__.py index 8a24d0f..8ed4aad 100644 --- a/__init__.py +++ b/__init__.py @@ -15,7 +15,7 @@ bl_info = { "name": "GP toolbox", "description": "Set of tools for Grease Pencil in animation production", "author": "Samuel Bernou", -"version": (1, 2, 0), +"version": (1, 2, 1), "blender": (2, 91, 0), "location": "sidebar (N menu) > Gpencil > Toolbox / Gpencil properties", "warning": "",