Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_nla.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 bpy.app.translations import contexts as i18n_contexts | from bpy.app.translations import contexts as i18n_contexts | ||||
| from bl_ui.space_dopesheet import ( | from bl_ui.space_dopesheet import ( | ||||
| DopesheetFilterPopoverBase, | DopesheetFilterPopoverBase, | ||||
| DopesheetActionPanelBase, | DopesheetActionPanelBase, | ||||
| dopesheet_filter, | dopesheet_filter, | ||||
| ) | ) | ||||
| from bl_ui.space_time import TIME_HT_editor_buttons | |||||
| class NLA_HT_header(Header): | class NLA_HT_header(Header): | ||||
| bl_space_type = 'NLA_EDITOR' | bl_space_type = 'NLA_EDITOR' | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| st = context.space_data | st = context.space_data | ||||
| Show All 9 Lines | def draw(self, context): | ||||
| layout.popover( | layout.popover( | ||||
| panel="NLA_PT_filters", | panel="NLA_PT_filters", | ||||
| text="", | text="", | ||||
| icon='FILTER', | icon='FILTER', | ||||
| ) | ) | ||||
| layout.prop(st, "auto_snap", text="") | layout.prop(st, "auto_snap", text="") | ||||
| class NLA_HT_footer(Header): | |||||
| bl_space_type = 'NLA_EDITOR' | |||||
| bl_region_type = 'FOOTER' | |||||
| def draw(self, context): | |||||
| TIME_HT_editor_buttons.draw_header(context, self.layout) | |||||
| class NLA_PT_filters(DopesheetFilterPopoverBase, Panel): | class NLA_PT_filters(DopesheetFilterPopoverBase, Panel): | ||||
| bl_space_type = 'NLA_EDITOR' | bl_space_type = 'NLA_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 279 Lines • ▼ Show 20 Lines | def draw(self, _context): | ||||
| layout = self.layout | layout = self.layout | ||||
| layout.operator_menu_enum("anim.channels_move", "direction", text="Track Ordering...") | layout.operator_menu_enum("anim.channels_move", "direction", text="Track Ordering...") | ||||
| layout.operator("anim.channels_clean_empty") | layout.operator("anim.channels_clean_empty") | ||||
| classes = ( | classes = ( | ||||
| NLA_HT_header, | NLA_HT_header, | ||||
| NLA_HT_footer, | |||||
| NLA_MT_edit, | NLA_MT_edit, | ||||
| NLA_MT_editor_menus, | NLA_MT_editor_menus, | ||||
| NLA_MT_view, | NLA_MT_view, | ||||
| NLA_MT_select, | NLA_MT_select, | ||||
| NLA_MT_marker, | NLA_MT_marker, | ||||
| NLA_MT_marker_select, | NLA_MT_marker_select, | ||||
| NLA_MT_add, | NLA_MT_add, | ||||
| NLA_MT_edit_transform, | NLA_MT_edit_transform, | ||||
| Show All 12 Lines | |||||