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
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+)

View File

@ -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:')

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
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:')

View File

@ -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": "",