[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [1513] trunk/py/scripts/addons/ animation_animall.py: AnimAll: check if there is an active shapekey when inserting a SK keyframe

Daniel Salazar zanqdo at gmail.com
Thu Jan 27 02:07:05 CET 2011


Revision: 1513
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=1513
Author:   zanqdo
Date:     2011-01-27 01:07:04 +0000 (Thu, 27 Jan 2011)
Log Message:
-----------
AnimAll: check if there is an active shapekey when inserting a SK keyframe

Modified Paths:
--------------
    trunk/py/scripts/addons/animation_animall.py

Modified: trunk/py/scripts/addons/animation_animall.py
===================================================================
--- trunk/py/scripts/addons/animation_animall.py	2011-01-26 23:45:26 UTC (rev 1512)
+++ trunk/py/scripts/addons/animation_animall.py	2011-01-27 01:07:04 UTC (rev 1513)
@@ -136,8 +136,9 @@
             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 @@
         
         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 @@
             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 @@
 
         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'}
 



More information about the Bf-extensions-cvs mailing list