From e76cef723ded343eb255ccc3db9183d859e0b55c Mon Sep 17 00:00:00 2001 From: Daniel Salazar <zanqdo@gmail.com> Date: Sun, 21 Nov 2010 23:38:30 +0000 Subject: [PATCH] Option to clear all animation --- animation_rotobezier.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/animation_rotobezier.py b/animation_rotobezier.py index da553c959..5ff52fe6b 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): -- GitLab