Exemplo n.º 1
0
    def draw(self, context):
        layout = self.layout

        st = context.space_data

        # bfa - show hide the editormenu
        ALL_MT_editormenu.draw_hidden(context, layout)

        if st.mode == 'TIMELINE':
            from bl_ui.space_time import (
                TIME_MT_editor_menus,
                TIME_HT_editor_buttons,
            )
            TIME_MT_editor_menus.draw_collapsible(context, layout)
            TIME_HT_editor_buttons.draw_header(context, layout)
        else:

            # Switch between the editors

            # bfa - The tabs to switch between the four animation editors. The classes are in space_dopesheet.py
            row = layout.row(align=True)

            row.operator("wm.switch_editor_in_dopesheet",
                         text="",
                         icon='DOPESHEET_ACTIVE')
            row.operator("wm.switch_editor_to_graph", text="", icon='GRAPH')
            row.operator("wm.switch_editor_to_driver", text="", icon='DRIVER')
            row.operator("wm.switch_editor_to_nla", text="", icon='NLA')

            ###########################

            layout.prop(st, "ui_mode", text="")

            DOPESHEET_MT_editor_menus.draw_collapsible(context, layout)
            DOPESHEET_HT_editor_buttons.draw_header(context, layout)
Exemplo n.º 2
0
    def draw(self, context):
        layout = self.layout

        st = context.space_data

        layout.template_header()

        if st.mode == 'TIMELINE':
            from bl_ui.space_time import (
                TIME_MT_editor_menus,
                TIME_HT_editor_buttons,
            )
            TIME_MT_editor_menus.draw_collapsible(context, layout)
            TIME_HT_editor_buttons.draw_header(context, layout)
        else:
            layout.prop(st, "ui_mode", text="")

            DOPESHEET_MT_editor_menus.draw_collapsible(context, layout)
            DOPESHEET_HT_editor_buttons.draw_header(context, layout)
Exemplo n.º 3
0
    def draw(self, context):
        layout = self.layout

        st = context.space_data

        ALL_MT_editormenu.draw_hidden(context, layout) # bfa - show hide the editormenu

        if st.mode == 'TIMELINE':
            from bl_ui.space_time import (
                TIME_MT_editor_menus,
                TIME_HT_editor_buttons,
            )
            TIME_MT_editor_menus.draw_collapsible(context, layout)
            TIME_HT_editor_buttons.draw_header(context, layout)
        else:
            layout.prop(st, "ui_mode", text="")

            DOPESHEET_MT_editor_menus.draw_collapsible(context, layout)
            DOPESHEET_HT_editor_buttons.draw_header(context, layout)