diff options
Diffstat (limited to 'release/scripts/startup/bl_ui/space_info.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_info.py | 38 |
1 files changed, 27 insertions, 11 deletions
diff --git a/release/scripts/startup/bl_ui/space_info.py b/release/scripts/startup/bl_ui/space_info.py index a7b518dfd2e..aa999e72f7d 100644 --- a/release/scripts/startup/bl_ui/space_info.py +++ b/release/scripts/startup/bl_ui/space_info.py @@ -28,25 +28,42 @@ class INFO_HT_header(Header): layout = self.layout window = context.window + workspace = context.workspace + screen = context.screen scene = context.scene - rd = scene.render + layer = context.render_layer + view_render = workspace.view_render row = layout.row(align=True) row.template_header() INFO_MT_editor_menus.draw_collapsible(context, layout) - if window.screen.show_fullscreen: + layout.separator() + + if screen.show_fullscreen: layout.operator("screen.back_to_previous", icon='SCREEN_BACK', text="Back to Previous") layout.separator() else: - layout.template_ID(context.window, "screen", new="screen.new", unlink="screen.delete") - layout.template_ID(context.screen, "scene", new="scene.new", unlink="scene.delete") + layout.template_ID(window, "workspace", new="workspace.workspace_add_menu", unlink="workspace.workspace_delete") + layout.template_search_preview(window, "screen", workspace, "screens", new="screen.new", unlink="screen.delete", rows=2, cols=6) + + if hasattr(workspace, 'object_mode'): + act_mode_item = bpy.types.Object.bl_rna.properties['mode'].enum_items[workspace.object_mode] + else: + act_mode_item = bpy.types.Object.bl_rna.properties['mode'].enum_items[layer.objects.active.mode] + layout.operator_menu_enum("object.mode_set", "mode", text=act_mode_item.name, icon=act_mode_item.icon) + + row = layout.row() + row.active = not workspace.use_scene_settings + row.template_search(workspace, "render_layer", scene, "render_layers") + + if view_render.has_multiple_engines: + row.prop(view_render, "engine", text="") layout.separator() - if rd.has_multiple_engines: - layout.prop(rd, "engine", text="") + layout.template_ID(window, "scene", new="scene.new", unlink="scene.delete") layout.separator() @@ -69,7 +86,7 @@ class INFO_HT_header(Header): return row.operator("wm.splash", text="", icon='BLENDER', emboss=False) - row.label(text=scene.statistics(), translate=False) + row.label(text=scene.statistics(context.render_layer), translate=False) class INFO_MT_editor_menus(Menu): @@ -81,12 +98,11 @@ class INFO_MT_editor_menus(Menu): @staticmethod def draw_menus(layout, context): - scene = context.scene - rd = scene.render + view_render = context.view_render layout.menu("INFO_MT_file") - if rd.use_game_engine: + if view_render.use_game_engine: layout.menu("INFO_MT_game") else: layout.menu("INFO_MT_render") @@ -293,7 +309,7 @@ class INFO_MT_window(Menu): layout = self.layout - layout.operator("wm.window_duplicate") + layout.operator("wm.window_new") layout.operator("wm.window_fullscreen_toggle", icon='FULLSCREEN_ENTER') layout.separator() |