From de6df617f4d66e158d1330d669997189d39b1b65 Mon Sep 17 00:00:00 2001 From: Daniel Salazar Date: Mon, 30 Dec 2013 05:52:34 -0600 Subject: Animall Addon: Some small cleanup --- animation_animall.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'animation_animall.py') diff --git a/animation_animall.py b/animation_animall.py index a7eb1ab6..a8b1ae2e 100644 --- a/animation_animall.py +++ b/animation_animall.py @@ -88,11 +88,8 @@ class VIEW3D_PT_animall(bpy.types.Panel): # show this addon only in the Camera-Data-Panel @classmethod def poll(self, context): - if context.active_object: - return context.active_object.type == 'MESH'\ - or context.active_object.type == 'LATTICE'\ - or context.active_object.type == 'CURVE'\ - or context.active_object.type == 'SURFACE' + if context.active_object.type in {'MESH', 'LATTICE', 'CURVE', 'SURFACE'}: + return context.active_object.type # draw the gui def draw(self, context): @@ -228,7 +225,7 @@ class ANIM_OT_insert_keyframe_animall(bpy.types.Operator): if Mode: bpy.ops.object.editmode_toggle() - if Obj.type == 'CURVE' or Obj.type == 'SURFACE': + if Obj.type in {'CURVE', 'SURFACE'}: Mode = False if context.mode != 'OBJECT': Mode = not Mode @@ -357,7 +354,7 @@ class ANIM_OT_delete_keyframe_animall(bpy.types.Operator): if Mode: bpy.ops.object.editmode_toggle() - if Obj.type == 'CURVE' or Obj.type == 'SURFACE': + if Obj.type in {'CURVE', 'SURFACE'}: Mode = False if context.mode != 'OBJECT': Mode = not Mode -- cgit v1.2.3