Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Salazar <zanqdo@gmail.com>2013-12-30 15:52:34 +0400
committerDaniel Salazar <zanqdo@gmail.com>2013-12-30 15:52:34 +0400
commitde6df617f4d66e158d1330d669997189d39b1b65 (patch)
treea1c2e6285afc42843f589d5f6d005e915a1bebf1 /animation_animall.py
parent0065c197c85cd249dbb4b72d6058a1fb265dea02 (diff)
Animall Addon: Some small cleanup
Diffstat (limited to 'animation_animall.py')
-rw-r--r--animation_animall.py11
1 files changed, 4 insertions, 7 deletions
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