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
This commit is contained in:
+7
-5
@@ -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:')
|
||||
|
||||
Reference in New Issue
Block a user