From ce1bc1838b611b53fe06dc3ead81eb4b0460634b Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Wed, 20 May 2015 15:30:33 +0200 Subject: Clean channels tool for Hwoozeberry. Basically it's a clean keyframes tool, but also removes a channel if the only remaining keyframe has the default value only and is not used by drivers or generative modifiers. It's was used to help with performance of keyframe-heavy scenes in gooseberry. Note, as always the curve left after the clean tool is used is not the same as the original, so this tool is better used before doing custom editing of fcurves and after initial keyframe insertion, to get rid of any unwanted keyframes inserted while doing mass keyframe insertion (by selecting all bones and pressing I for instance) --- release/scripts/startup/bl_ui/space_dopesheet.py | 3 +++ release/scripts/startup/bl_ui/space_graph.py | 2 ++ 2 files changed, 5 insertions(+) (limited to 'release') diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py index 0b7502b585b..7fd9719a6e3 100644 --- a/release/scripts/startup/bl_ui/space_dopesheet.py +++ b/release/scripts/startup/bl_ui/space_dopesheet.py @@ -339,6 +339,7 @@ class DOPESHEET_MT_key(Menu): layout.separator() layout.operator("action.clean") + layout.operator("action.clean", text="Clean Channels").channels = True layout.operator("action.sample") layout.separator() @@ -421,6 +422,8 @@ class DOPESHEET_MT_delete(Menu): layout.separator() layout.operator("action.clean") + layout.operator("action.clean", text="Clean Channels").channels = True + if __name__ == "__main__": # only for live edit. bpy.utils.register_module(__name__) diff --git a/release/scripts/startup/bl_ui/space_graph.py b/release/scripts/startup/bl_ui/space_graph.py index 2f5381e58c8..104fd14797e 100644 --- a/release/scripts/startup/bl_ui/space_graph.py +++ b/release/scripts/startup/bl_ui/space_graph.py @@ -258,6 +258,7 @@ class GRAPH_MT_key(Menu): layout.separator() layout.operator("graph.clean") + layout.operator("graph.clean", text="Clean Channels").channels = True layout.operator("graph.smooth") layout.operator("graph.sample") layout.operator("graph.bake") @@ -293,6 +294,7 @@ class GRAPH_MT_delete(Menu): layout.separator() layout.operator("graph.clean") + layout.operator("graph.clean", text="Clean Channels").channels = True if __name__ == "__main__": # only for live edit. -- cgit v1.2.3