Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_dopesheet.py
| Show First 20 Lines • Show All 253 Lines • ▼ Show 20 Lines | def draw_header(context, layout): | ||||
| row = layout.row(align=True) | row = layout.row(align=True) | ||||
| row.enabled = enable_but | row.enabled = enable_but | ||||
| row.operator("gpencil.layer_isolate", icon='RESTRICT_VIEW_ON', text="").affect_visibility = True | row.operator("gpencil.layer_isolate", icon='RESTRICT_VIEW_ON', text="").affect_visibility = True | ||||
| row.operator("gpencil.layer_isolate", icon='LOCKED', text="").affect_visibility = False | row.operator("gpencil.layer_isolate", icon='LOCKED', text="").affect_visibility = False | ||||
| layout.separator_spacer() | layout.separator_spacer() | ||||
| # Grease Pencil mode doesn't need snapping, as it's frame-aligned only | |||||
| if st.mode != 'GPENCIL': | |||||
| layout.prop(st, "auto_snap", text="", icon_only=True) | |||||
| row = layout.row(align=True) | |||||
| row.prop(tool_settings, "use_proportional_action", text="", icon_only=True) | |||||
| sub = row.row(align=True) | |||||
| sub.active = tool_settings.use_proportional_action | |||||
| sub.prop(tool_settings, "proportional_edit_falloff", text="", icon_only=True) | |||||
| layout.separator_spacer() | |||||
| if st.mode == 'DOPESHEET': | if st.mode == 'DOPESHEET': | ||||
| dopesheet_filter(layout, context) | dopesheet_filter(layout, context) | ||||
| elif st.mode == 'ACTION': | elif st.mode == 'ACTION': | ||||
| dopesheet_filter(layout, context) | dopesheet_filter(layout, context) | ||||
| elif st.mode == 'GPENCIL': | elif st.mode == 'GPENCIL': | ||||
| row = layout.row(align=True) | row = layout.row(align=True) | ||||
| row.prop(st.dopesheet, "show_only_selected", text="") | row.prop(st.dopesheet, "show_only_selected", text="") | ||||
| row.prop(st.dopesheet, "show_hidden", text="") | row.prop(st.dopesheet, "show_hidden", text="") | ||||
| layout.popover( | layout.popover( | ||||
| panel="DOPESHEET_PT_filters", | panel="DOPESHEET_PT_filters", | ||||
| text="", | text="", | ||||
| icon='FILTER', | icon='FILTER', | ||||
| ) | ) | ||||
| # Grease Pencil mode doesn't need snapping, as it's frame-aligned only | |||||
| if st.mode != 'GPENCIL': | |||||
| layout.prop(st, "auto_snap", text="") | |||||
| row = layout.row(align=True) | |||||
| row.prop(tool_settings, "use_proportional_action", text="", icon_only=True) | |||||
| sub = row.row(align=True) | |||||
| sub.active = tool_settings.use_proportional_action | |||||
| sub.prop(tool_settings, "proportional_edit_falloff", text="", icon_only=True) | |||||
| class DOPESHEET_MT_editor_menus(Menu): | class DOPESHEET_MT_editor_menus(Menu): | ||||
| bl_idname = "DOPESHEET_MT_editor_menus" | bl_idname = "DOPESHEET_MT_editor_menus" | ||||
| bl_label = "" | bl_label = "" | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| st = context.space_data | st = context.space_data | ||||
| ▲ Show 20 Lines • Show All 547 Lines • Show Last 20 Lines | |||||