parent
3594c4812d
commit
9b06aee9af
|
@ -1,5 +1,10 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
|
||||||
|
1.1.2:
|
||||||
|
|
||||||
|
- fix: Breakdowner initial error check
|
||||||
|
|
||||||
1.2.0:
|
1.2.0:
|
||||||
|
|
||||||
- feat: New depth move operator that handle both perspective and orthographic cam
|
- feat: New depth move operator that handle both perspective and orthographic cam
|
||||||
|
|
|
@ -211,16 +211,23 @@ class OBJ_OT_breakdown_obj_anim(bpy.types.Operator):
|
||||||
## cursors
|
## 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'
|
## '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
|
## start checks
|
||||||
message = None
|
if context.area.type != 'VIEW_3D':
|
||||||
if context.area.type != 'VIEW_3D':message = 'View3D not found, cannot run operator'
|
self.report({'WARNING'}, 'View3D not found, cannot run operator')
|
||||||
|
return {'CANCELLED'}
|
||||||
|
|
||||||
obj = bpy.context.object# better use self.context
|
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
|
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
|
action = anim_data.action
|
||||||
if not action:message = f'no action on animation data of obj: {obj.name}'
|
if not action:
|
||||||
if message:
|
self.report({'WARNING'}, f'No action on animation data of obj: {obj.name}')
|
||||||
self.report({'WARNING'}, message)# ERROR
|
|
||||||
return {'CANCELLED'}
|
return {'CANCELLED'}
|
||||||
|
|
||||||
## initiate variable to use
|
## initiate variable to use
|
||||||
|
|
|
@ -15,7 +15,7 @@ bl_info = {
|
||||||
"name": "GP toolbox",
|
"name": "GP toolbox",
|
||||||
"description": "Set of tools for Grease Pencil in animation production",
|
"description": "Set of tools for Grease Pencil in animation production",
|
||||||
"author": "Samuel Bernou",
|
"author": "Samuel Bernou",
|
||||||
"version": (1, 2, 0),
|
"version": (1, 2, 1),
|
||||||
"blender": (2, 91, 0),
|
"blender": (2, 91, 0),
|
||||||
"location": "sidebar (N menu) > Gpencil > Toolbox / Gpencil properties",
|
"location": "sidebar (N menu) > Gpencil > Toolbox / Gpencil properties",
|
||||||
"warning": "",
|
"warning": "",
|
||||||
|
|
Loading…
Reference in New Issue