Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_dopesheet.py
| Show First 20 Lines • Show All 232 Lines • ▼ Show 20 Lines | def draw_header(context, layout): | ||||
| layout.separator_spacer() | layout.separator_spacer() | ||||
| layout.template_ID(st, "action", new="action.new", unlink="action.unlink") | layout.template_ID(st, "action", new="action.new", unlink="action.unlink") | ||||
| # Layer management | # Layer management | ||||
| if st.mode == 'GPENCIL': | if st.mode == 'GPENCIL': | ||||
| ob = context.active_object | ob = context.active_object | ||||
| selected = st.dopesheet.show_only_selected | enable_but = ob is not None and ob.type == 'GPENCIL' | ||||
| enable_but = selected and ob is not None and ob.type == 'GPENCIL' | |||||
| row = layout.row(align=True) | row = layout.row(align=True) | ||||
| row.enabled = enable_but | row.enabled = enable_but | ||||
| row.operator("gpencil.layer_add", icon='ADD', text="") | row.operator("gpencil.layer_add", icon='ADD', text="") | ||||
| row.operator("gpencil.layer_remove", icon='REMOVE', text="") | row.operator("gpencil.layer_remove", icon='REMOVE', text="") | ||||
| row.menu("GPENCIL_MT_layer_context_menu", icon='DOWNARROW_HLT', text="") | row.menu("GPENCIL_MT_layer_context_menu", icon='DOWNARROW_HLT', text="") | ||||
| row = layout.row(align=True) | row = layout.row(align=True) | ||||
| ▲ Show 20 Lines • Show All 592 Lines • Show Last 20 Lines | |||||