diff --git a/CHANGELOG.md b/CHANGELOG.md index 3af2bea..b73b47a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +2.0.1 + +- added: enable/disable camera animation separately in `animation manager` + - for cam,disable properties like focal and shift (to be able to work on a fixed cam) + - camera is not disable using `obj` anymore + 2.0.0 - fix: error using playblast (api changes of Blender 3.0+) diff --git a/OP_helpers.py b/OP_helpers.py index b1a98f8..0dafaa6 100644 --- a/OP_helpers.py +++ b/OP_helpers.py @@ -370,8 +370,7 @@ class GPTB_OT_toggle_mute_animation(bpy.types.Operator): mute : bpy.props.BoolProperty(default=False) - skip_gp : bpy.props.BoolProperty(default=False) - skip_obj : bpy.props.BoolProperty(default=False) + mode : bpy.props.StringProperty(default='OBJECT') # GPENCIL, CAMERA, OBJECT, ALL def invoke(self, context, event): self.selection = event.shift @@ -390,12 +389,15 @@ class GPTB_OT_toggle_mute_animation(bpy.types.Operator): pool = context.scene.objects for o in pool: - if self.skip_gp and o.type == 'GPENCIL': + if self.mode == 'GPENCIL' and o.type != 'GPENCIL': continue - if self.skip_obj and o.type != 'GPENCIL': + if self.mode == 'OBJECT' and o.type in ('GPENCIL', 'CAMERA'): + continue + if self.mode == 'CAMERA' and o.type != 'CAMERA': continue - if o.type == 'GPENCIL' and o.data.animation_data: + # mute attribute aniamtion for GP and cameras + if o.type in ('GPENCIL', 'CAMERA') and o.data.animation_data: gp_act = o.data.animation_data.action if gp_act: print(f'\n---{o.name} data:') diff --git a/UI_tools.py b/UI_tools.py index 55f6d75..2a03bcf 100644 --- a/UI_tools.py +++ b/UI_tools.py @@ -190,32 +190,40 @@ class GPTB_PT_anim_manager(Panel): ## Animation enable disable anim (shift click to select) OP_helpers.GPTB_OT_toggle_mute_animation col.operator('gp.list_disabled_anims') - ## Objs () + ## Objs row = col.row(align=True) row.label(text='Obj anims:') - ops = row.operator('gp.toggle_mute_animation', text = 'ON')#, icon = 'GRAPH' - ops.skip_gp = True - ops.skip_obj = False + ops = row.operator('gp.toggle_mute_animation', text = 'ON') + ops.mode = 'OBJECT' ops.mute = False - ops = row.operator('gp.toggle_mute_animation', text = 'OFF')#, icon = 'GRAPH' - ops.skip_gp = True - ops.skip_obj = False + ops = row.operator('gp.toggle_mute_animation', text = 'OFF') + ops.mode = 'OBJECT' ops.mute = True + ## Cams + row = col.row(align=True) + row.label(text='Cam anims:') + ops = row.operator('gp.toggle_mute_animation', text = 'ON') + ops.mode = 'CAMERA' + ops.mute = False + + ops = row.operator('gp.toggle_mute_animation', text = 'OFF') + ops.mode = 'CAMERA' + ops.mute = True + ## GPs row = col.row(align=True) row.label(text='Gp anims:') - ops = row.operator('gp.toggle_mute_animation', text = 'ON')#, icon = 'GRAPH' - ops.skip_gp = False - ops.skip_obj = True + ops = row.operator('gp.toggle_mute_animation', text = 'ON') + ops.mode = 'GPENCIL' ops.mute = False - ops = row.operator('gp.toggle_mute_animation', text = 'OFF')#, icon = 'GRAPH' - ops.skip_gp = False - ops.skip_obj = True + ops = row.operator('gp.toggle_mute_animation', text = 'OFF') + ops.mode = 'GPENCIL' ops.mute = True - + + ## GP modifiers row = col.row(align=True) row.label(text='Gp modifiers:') diff --git a/__init__.py b/__init__.py index 74eed1d..e7de68b 100755 --- a/__init__.py +++ b/__init__.py @@ -4,7 +4,7 @@ bl_info = { "name": "GP toolbox", "description": "Tool set for Grease Pencil in animation production", "author": "Samuel Bernou, Christophe Seux", -"version": (2, 0, 0), +"version": (2, 0, 1), "blender": (2, 91, 0), "location": "Sidebar (N menu) > Gpencil > Toolbox / Gpencil properties", "warning": "",