[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [1181] trunk/py/scripts/addons/ animation_rotobezier.py: Option to clear all animation
Daniel Salazar
zanqdo at gmail.com
Mon Nov 22 00:38:31 CET 2010
Revision: 1181
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-extensions&revision=1181
Author: zanqdo
Date: 2010-11-22 00:38:30 +0100 (Mon, 22 Nov 2010)
Log Message:
-----------
Option to clear all animation
Modified Paths:
--------------
trunk/py/scripts/addons/animation_rotobezier.py
Modified: trunk/py/scripts/addons/animation_rotobezier.py
===================================================================
--- trunk/py/scripts/addons/animation_rotobezier.py 2010-11-21 20:24:51 UTC (rev 1180)
+++ trunk/py/scripts/addons/animation_rotobezier.py 2010-11-21 23:38:30 UTC (rev 1181)
@@ -65,6 +65,8 @@
row.operator('curve.insert_keyframe_rotobezier')
row.operator('curve.delete_keyframe_rotobezier')
row = layout.row()
+ row.operator('curve.clear_animation_rotobezier')
+ row = layout.row()
row.label(text="Display:")
row = layout.row()
row.operator('curve.toggle_draw_rotobezier')
@@ -156,7 +158,28 @@
return {'FINISHED'}
+class CURVE_OT_clear_animation_rotobezier(bpy.types.Operator):
+ bl_label = 'Clear Animation'
+ bl_idname = 'curve.clear_animation_rotobezier'
+ bl_description = 'Clear all animation from the curve'
+ bl_options = {'REGISTER', 'UNDO'}
+ # on mouse up:
+ def invoke(self, context, event):
+
+ self.main_func(context)
+
+ return {'FINISHED'}
+
+
+ def main_func(op, context):
+
+ Data = context.active_object.data
+ Data.animation_data_clear()
+
+ return {'FINISHED'}
+
+
# Matte Material Assignment Func
def MakeMatte (Type):
More information about the Bf-extensions-cvs
mailing list