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>2010-11-22 02:38:30 +0300
committerDaniel Salazar <zanqdo@gmail.com>2010-11-22 02:38:30 +0300
commite76cef723ded343eb255ccc3db9183d859e0b55c (patch)
treeb610dc6d0b09910733477294c508105ee3a88e1f /animation_rotobezier.py
parentab53d50698265c86139d5a467ddfad06555d5f69 (diff)
Option to clear all animation
Diffstat (limited to 'animation_rotobezier.py')
-rw-r--r--animation_rotobezier.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/animation_rotobezier.py b/animation_rotobezier.py
index da553c95..5ff52fe6 100644
--- a/animation_rotobezier.py
+++ b/animation_rotobezier.py
@@ -65,6 +65,8 @@ class OBJECT_PT_rotobezier(bpy.types.Panel):
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,6 +158,27 @@ class CURVE_OT_delete_keyframe_rotobezier(bpy.types.Operator):
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):