diff options
author | Daniel Salazar <zanqdo@gmail.com> | 2011-01-27 04:07:04 +0300 |
---|---|---|
committer | Daniel Salazar <zanqdo@gmail.com> | 2011-01-27 04:07:04 +0300 |
commit | 42a45649bd550c0e568d26ef843fca385abf37ad (patch) | |
tree | 3b46204185b573d550b29662b2696c948d97ad50 /animation_animall.py | |
parent | 8d59f3d0e57b701264eb6ad9331768e78645cf2c (diff) |
AnimAll: check if there is an active shapekey when inserting a SK keyframe
Diffstat (limited to 'animation_animall.py')
-rw-r--r-- | animation_animall.py | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/animation_animall.py b/animation_animall.py index 9ecbf2c1..64b0f450 100644 --- a/animation_animall.py +++ b/animation_animall.py @@ -136,8 +136,9 @@ class ANIM_OT_insert_keyframe_animall(bpy.types.Operator): Data = Obj.data if context.window_manager.key_shape: - for Point in Obj.active_shape_key.data: - Point.keyframe_insert('co') + if Obj.active_shape_key: + for Point in Obj.active_shape_key.data: + Point.keyframe_insert('co') if context.window_manager.key_vgroups: for Vert in Data.vertices: @@ -164,8 +165,9 @@ class ANIM_OT_insert_keyframe_animall(bpy.types.Operator): if Obj.type == 'LATTICE': if context.window_manager.key_shape: - for Point in Obj.active_shape_key.data: - Point.keyframe_insert('co') + if Obj.active_shape_key: + for Point in Obj.active_shape_key.data: + Point.keyframe_insert('co') return {'FINISHED'} @@ -199,8 +201,9 @@ class ANIM_OT_delete_keyframe_animall(bpy.types.Operator): Data = Obj.data if context.window_manager.key_shape: - for Point in Obj.active_shape_key.data: - Point.keyframe_delete('co') + if Obj.active_shape_key: + for Point in Obj.active_shape_key.data: + Point.keyframe_delete('co') if context.window_manager.key_vgroups: for Vert in Data.vertices: @@ -228,8 +231,9 @@ class ANIM_OT_delete_keyframe_animall(bpy.types.Operator): if Obj.type == 'LATTICE': if context.window_manager.key_shape: - for Point in Obj.active_shape_key.data: - Point.keyframe_delete('co') + if Obj.active_shape_key: + for Point in Obj.active_shape_key.data: + Point.keyframe_delete('co') return {'FINISHED'} |