Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_graph.py
| # SPDX-License-Identifier: GPL-2.0-or-later | # SPDX-License-Identifier: GPL-2.0-or-later | ||||
| from bpy.types import Header, Menu, Panel | from bpy.types import Header, Menu, Panel | ||||
| from bl_ui.space_dopesheet import ( | from bl_ui.space_dopesheet import ( | ||||
| DopesheetFilterPopoverBase, | DopesheetFilterPopoverBase, | ||||
| dopesheet_filter, | dopesheet_filter, | ||||
| ) | ) | ||||
| from bl_ui.space_time import TIME_HT_editor_buttons | |||||
| class GRAPH_HT_header(Header): | class GRAPH_HT_header(Header): | ||||
| bl_space_type = 'GRAPH_EDITOR' | bl_space_type = 'GRAPH_EDITOR' | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| tool_settings = context.tool_settings | tool_settings = context.tool_settings | ||||
| Show All 33 Lines | def draw(self, context): | ||||
| layout.prop(st, "auto_snap", text="") | layout.prop(st, "auto_snap", text="") | ||||
| row = layout.row(align=True) | row = layout.row(align=True) | ||||
| row.prop(tool_settings, "use_proportional_fcurve", text="", icon_only=True) | row.prop(tool_settings, "use_proportional_fcurve", text="", icon_only=True) | ||||
| sub = row.row(align=True) | sub = row.row(align=True) | ||||
| sub.active = tool_settings.use_proportional_fcurve | sub.active = tool_settings.use_proportional_fcurve | ||||
| sub.prop(tool_settings, "proportional_edit_falloff", text="", icon_only=True) | sub.prop(tool_settings, "proportional_edit_falloff", text="", icon_only=True) | ||||
| class GRAPH_HT_footer(Header): | |||||
| bl_space_type = 'GRAPH_EDITOR' | |||||
| bl_region_type = 'FOOTER' | |||||
| def draw(self, context): | |||||
| TIME_HT_editor_buttons.draw_header(context, self.layout) | |||||
| class GRAPH_PT_filters(DopesheetFilterPopoverBase, Panel): | class GRAPH_PT_filters(DopesheetFilterPopoverBase, Panel): | ||||
| bl_space_type = 'GRAPH_EDITOR' | bl_space_type = 'GRAPH_EDITOR' | ||||
| bl_region_type = 'HEADER' | bl_region_type = 'HEADER' | ||||
| bl_label = "Filters" | bl_label = "Filters" | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| ▲ Show 20 Lines • Show All 392 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| layout.operator("anim.channels_delete") | layout.operator("anim.channels_delete") | ||||
| if st.mode == 'DRIVERS': | if st.mode == 'DRIVERS': | ||||
| layout.operator("graph.driver_delete_invalid") | layout.operator("graph.driver_delete_invalid") | ||||
| classes = ( | classes = ( | ||||
| GRAPH_HT_header, | GRAPH_HT_header, | ||||
| GRAPH_HT_footer, | |||||
| GRAPH_MT_editor_menus, | GRAPH_MT_editor_menus, | ||||
| GRAPH_MT_view, | GRAPH_MT_view, | ||||
| GRAPH_MT_select, | GRAPH_MT_select, | ||||
| GRAPH_MT_marker, | GRAPH_MT_marker, | ||||
| GRAPH_MT_channel, | GRAPH_MT_channel, | ||||
| GRAPH_MT_key, | GRAPH_MT_key, | ||||
| GRAPH_MT_key_transform, | GRAPH_MT_key_transform, | ||||
| GRAPH_MT_key_snap, | GRAPH_MT_key_snap, | ||||
| Show All 14 Lines | |||||