[Bf-extensions-cvs] [de6df61] master: Animall Addon: Some small cleanup
Daniel Salazar
noreply at git.blender.org
Mon Dec 30 12:52:43 CET 2013
Commit: de6df617f4d66e158d1330d669997189d39b1b65
Author: Daniel Salazar
Date: Mon Dec 30 05:52:34 2013 -0600
https://developer.blender.org/rBAde6df617f4d66e158d1330d669997189d39b1b65
Animall Addon: Some small cleanup
===================================================================
M animation_animall.py
===================================================================
diff --git a/animation_animall.py b/animation_animall.py
index a7eb1ab..a8b1ae2 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
More information about the Bf-extensions-cvs
mailing list