separate anim disable for cameras

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
gpv2
Pullusb 2022-06-23 15:43:25 +02:00
parent 7092bbf1be
commit e1681cd6ad
4 changed files with 36 additions and 20 deletions

View File

@ -1,5 +1,11 @@
# Changelog # 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 2.0.0
- fix: error using playblast (api changes of Blender 3.0+) - fix: error using playblast (api changes of Blender 3.0+)

View File

@ -370,8 +370,7 @@ class GPTB_OT_toggle_mute_animation(bpy.types.Operator):
mute : bpy.props.BoolProperty(default=False) mute : bpy.props.BoolProperty(default=False)
skip_gp : bpy.props.BoolProperty(default=False) mode : bpy.props.StringProperty(default='OBJECT') # GPENCIL, CAMERA, OBJECT, ALL
skip_obj : bpy.props.BoolProperty(default=False)
def invoke(self, context, event): def invoke(self, context, event):
self.selection = event.shift self.selection = event.shift
@ -390,12 +389,15 @@ class GPTB_OT_toggle_mute_animation(bpy.types.Operator):
pool = context.scene.objects pool = context.scene.objects
for o in pool: for o in pool:
if self.skip_gp and o.type == 'GPENCIL': if self.mode == 'GPENCIL' and o.type != 'GPENCIL':
continue 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 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 gp_act = o.data.animation_data.action
if gp_act: if gp_act:
print(f'\n---{o.name} data:') print(f'\n---{o.name} data:')

View File

@ -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 ## Animation enable disable anim (shift click to select) OP_helpers.GPTB_OT_toggle_mute_animation
col.operator('gp.list_disabled_anims') col.operator('gp.list_disabled_anims')
## Objs () ## Objs
row = col.row(align=True) row = col.row(align=True)
row.label(text='Obj anims:') row.label(text='Obj anims:')
ops = row.operator('gp.toggle_mute_animation', text = 'ON')#, icon = 'GRAPH' ops = row.operator('gp.toggle_mute_animation', text = 'ON')
ops.skip_gp = True ops.mode = 'OBJECT'
ops.skip_obj = False
ops.mute = False ops.mute = False
ops = row.operator('gp.toggle_mute_animation', text = 'OFF')#, icon = 'GRAPH' ops = row.operator('gp.toggle_mute_animation', text = 'OFF')
ops.skip_gp = True ops.mode = 'OBJECT'
ops.skip_obj = False 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 ops.mute = True
## GPs ## GPs
row = col.row(align=True) row = col.row(align=True)
row.label(text='Gp anims:') row.label(text='Gp anims:')
ops = row.operator('gp.toggle_mute_animation', text = 'ON')#, icon = 'GRAPH' ops = row.operator('gp.toggle_mute_animation', text = 'ON')
ops.skip_gp = False ops.mode = 'GPENCIL'
ops.skip_obj = True
ops.mute = False ops.mute = False
ops = row.operator('gp.toggle_mute_animation', text = 'OFF')#, icon = 'GRAPH' ops = row.operator('gp.toggle_mute_animation', text = 'OFF')
ops.skip_gp = False ops.mode = 'GPENCIL'
ops.skip_obj = True
ops.mute = True ops.mute = True
## GP modifiers ## GP modifiers
row = col.row(align=True) row = col.row(align=True)
row.label(text='Gp modifiers:') row.label(text='Gp modifiers:')

View File

@ -4,7 +4,7 @@ bl_info = {
"name": "GP toolbox", "name": "GP toolbox",
"description": "Tool set for Grease Pencil in animation production", "description": "Tool set for Grease Pencil in animation production",
"author": "Samuel Bernou, Christophe Seux", "author": "Samuel Bernou, Christophe Seux",
"version": (2, 0, 0), "version": (2, 0, 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": "",