diff options
Diffstat (limited to 'release/scripts/startup/bl_ui/space_graph.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_graph.py | 92 |
1 files changed, 81 insertions, 11 deletions
diff --git a/release/scripts/startup/bl_ui/space_graph.py b/release/scripts/startup/bl_ui/space_graph.py index 5ed58a57e47..6aeef4d7240 100644 --- a/release/scripts/startup/bl_ui/space_graph.py +++ b/release/scripts/startup/bl_ui/space_graph.py @@ -36,9 +36,10 @@ class GRAPH_HT_header(Header): row = layout.row(align=True) row.template_header() - GRAPH_MT_editor_menus.draw_collapsible(context, layout) + # Now a exposed as a sub-space type + # layout.prop(st, "mode", text="") - layout.prop(st, "mode", text="") + GRAPH_MT_editor_menus.draw_collapsible(context, layout) dopesheet_filter(layout, context) @@ -48,13 +49,13 @@ class GRAPH_HT_header(Header): sub.active = st.use_normalization sub.prop(st, "use_auto_normalization", icon='FILE_REFRESH', text="", toggle=True) - row = layout.row(align=True) + layout.separator_spacer() - row.prop(toolsettings, "use_proportional_fcurve", - text="", icon_only=True) - if toolsettings.use_proportional_fcurve: - row.prop(toolsettings, "proportional_edit_falloff", - text="", icon_only=True) + row = layout.row(align=True) + row.prop(toolsettings, "use_proportional_fcurve", text="", icon_only=True) + sub = row.row(align=True) + sub.active = toolsettings.use_proportional_fcurve + sub.prop(toolsettings, "proportional_edit_falloff", text="", icon_only=True) layout.prop(st, "auto_snap", text="") layout.prop(st, "pivot_point", icon_only=True) @@ -129,9 +130,7 @@ class GRAPH_MT_view(Menu): layout.operator("graph.view_frame") layout.separator() - layout.operator("screen.area_dupli") - layout.operator("screen.screen_full_area") - layout.operator("screen.screen_full_area", text="Toggle Fullscreen Area").use_hide_panels = True + layout.menu("INFO_MT_area") class GRAPH_MT_select(Menu): @@ -302,6 +301,75 @@ class GRAPH_MT_delete(Menu): layout.operator("graph.clean", text="Clean Channels").channels = True +class GRAPH_MT_specials(Menu): + bl_label = "F-Curve Context Menu" + + def draw(self, context): + layout = self.layout + + layout.operator("graph.copy", text="Copy") + layout.operator("graph.paste", text="Paste") + layout.operator("graph.paste", text="Paste Flipped").flipped = True + + layout.separator() + + layout.operator_menu_enum("graph.handle_type", "type", text="Handle Type") + layout.operator_menu_enum("graph.interpolation_type", "type", text="Interpolation Mode") + layout.operator_menu_enum("graph.easing_type", "type", text="Easing Type") + + layout.separator() + + layout.operator("graph.keyframe_insert").type = 'SEL' + layout.operator("graph.duplicate_move") + layout.operator("graph.delete") + + layout.separator() + + layout.operator_menu_enum("graph.mirror", "type", text="Mirror") + layout.operator_menu_enum("graph.snap", "type", text="Snap") + + +class GRAPH_MT_channel_specials(Menu): + bl_label = "F-Curve Channel Context Menu" + + def draw(self, context): + layout = self.layout + st = context.space_data + + layout.separator() + layout.operator("anim.channels_setting_enable", text="Mute Channels").type = 'MUTE' + layout.operator("anim.channels_setting_disable", text="Unmute Channels").type = 'MUTE' + layout.separator() + layout.operator("anim.channels_setting_enable", text="Protect Channels").type = 'PROTECT' + layout.operator("anim.channels_setting_disable", text="Unprotect Channels").type = 'PROTECT' + + layout.separator() + layout.operator("anim.channels_group") + layout.operator("anim.channels_ungroup") + + layout.separator() + layout.operator("anim.channels_editable_toggle") + layout.operator_menu_enum("graph.extrapolation_type", "type", text="Extrapolation Mode") + + layout.separator() + layout.operator("graph.hide", text="Hide Selected Curves").unselected = False + layout.operator("graph.hide", text="Hide Unselected Curves").unselected = True + layout.operator("graph.reveal") + + layout.separator() + layout.operator("anim.channels_expand") + layout.operator("anim.channels_collapse") + + layout.separator() + layout.operator_menu_enum("anim.channels_move", "direction", text="Move...") + + layout.separator() + + layout.operator("anim.channels_delete") + if st.mode == 'DRIVERS': + layout.operator("graph.driver_delete_invalid") + + classes = ( GRAPH_HT_header, GRAPH_MT_editor_menus, @@ -312,6 +380,8 @@ classes = ( GRAPH_MT_key, GRAPH_MT_key_transform, GRAPH_MT_delete, + GRAPH_MT_specials, + GRAPH_MT_channel_specials, ) if __name__ == "__main__": # only for live edit. |