2009-11-01 15:21:20 +00:00
|
|
|
# ##### BEGIN GPL LICENSE BLOCK #####
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
2009-11-03 07:23:02 +00:00
|
|
|
#
|
2009-11-01 15:21:20 +00:00
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
2009-11-03 07:23:02 +00:00
|
|
|
#
|
2009-11-01 15:21:20 +00:00
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software Foundation,
|
2010-02-12 13:34:04 +00:00
|
|
|
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2009-11-01 15:21:20 +00:00
|
|
|
#
|
|
|
|
# ##### END GPL LICENSE BLOCK #####
|
2009-10-31 20:16:59 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
# <pep8 compliant>
|
2009-06-30 19:20:45 +00:00
|
|
|
import bpy
|
2011-09-22 19:50:41 +00:00
|
|
|
from bpy.types import Header, Menu
|
2009-06-30 19:20:45 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class INFO_HT_header(Header):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_space_type = 'INFO'
|
2009-06-30 19:20:45 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2010-03-06 01:40:29 +00:00
|
|
|
|
2009-12-08 07:12:06 +00:00
|
|
|
window = context.window
|
Main Workspace Integration
This commit does the main integration of workspaces, which is a design we agreed on during the 2.8 UI workshop (see https://wiki.blender.org/index.php/Dev:2.8/UI/Workshop_Writeup)
Workspaces should generally be stable, I'm not aware of any remaining bugs (or I've forgotten them :) ). If you find any, let me know!
(Exception: mode switching button might get out of sync with actual mode in some cases, would consider that a limitation/ToDo. Needs to be resolved at some point.)
== Main Changes/Features
* Introduces the new Workspaces as data-blocks.
* Allow storing a number of custom workspaces as part of the user configuration. Needs further work to allow adding and deleting individual workspaces.
* Bundle a default workspace configuration with Blender (current screen-layouts converted to workspaces).
* Pressing button to add a workspace spawns a menu to select between "Duplicate Current" and the workspaces from the user configuration. If no workspaces are stored in the user configuration, the default workspaces are listed instead.
* Store screen-layouts (`bScreen`) per workspace.
* Store an active screen-layout per workspace. Changing the workspace will enable this layout.
* Store active mode in workspace. Changing the workspace will also enter the mode of the new workspace. (Note that we still store the active mode in the object, moving this completely to workspaces is a separate project.)
* Store an active render layer per workspace.
* Moved mode switch from 3D View header to Info Editor header.
* Store active scene in window (not directly workspace related, but overlaps quite a bit).
* Removed 'Use Global Scene' User Preference option.
* Compatibility with old files - a new workspace is created for every screen-layout of old files. Old Blender versions should be able to read files saved with workspace support as well.
* Default .blend only contains one workspace ("General").
* Support appending workspaces.
Opening files without UI and commandline rendering should work fine.
Note that the UI is temporary! We plan to introduce a new global topbar
that contains the workspace options and tabs for switching workspaces.
== Technical Notes
* Workspaces are data-blocks.
* Adding and removing `bScreen`s should be done through `ED_workspace_layout` API now.
* A workspace can be active in multiple windows at the same time.
* The mode menu (which is now in the Info Editor header) doesn't display "Grease Pencil Edit" mode anymore since its availability depends on the active editor. Will be fixed by making Grease Pencil an own object type (as planned).
* The button to change the active workspace object mode may get out of sync with the mode of the active object. Will either be resolved by moving mode out of object data, or we'll disable workspace modes again (there's a `#define USE_WORKSPACE_MODE` for that).
* Screen-layouts (`bScreen`) are IDs and thus stored in a main list-base. Had to add a wrapper `WorkSpaceLayout` so we can store them in a list-base within workspaces, too. On the long run we could completely replace `bScreen` by workspace structs.
* `WorkSpace` types use some special compiler trickery to allow marking structs and struct members as private. BKE_workspace API should be used for accessing those.
* Added scene operators `SCENE_OT_`. Was previously done through screen operators.
== BPY API Changes
* Removed `Screen.scene`, added `Window.scene`
* Removed `UserPreferencesView.use_global_scene`
* Added `Context.workspace`, `Window.workspace` and `BlendData.workspaces`
* Added `bpy.types.WorkSpace` containing `screens`, `object_mode` and `render_layer`
* Added Screen.layout_name for the layout name that'll be displayed in the UI (may differ from internal name)
== What's left?
* There are a few open design questions (T50521). We should find the needed answers and implement them.
* Allow adding and removing individual workspaces from workspace configuration (needs UI design).
* Get the override system ready and support overrides per workspace.
* Support custom UI setups as part of workspaces (hidden panels, hidden buttons, customizable toolbars, etc).
* Allow enabling add-ons per workspace.
* Support custom workspace keymaps.
* Remove special exception for workspaces in linking code (so they're always appended, never linked). Depends on a few things, so best to solve later.
* Get the topbar done.
* Workspaces need a proper icon, current one is just a placeholder :)
Reviewed By: campbellbarton, mont29
Tags: #user_interface, #bf_blender_2.8
Maniphest Tasks: T50521
Differential Revision: https://developer.blender.org/D2451
2017-06-01 19:56:58 +02:00
|
|
|
workspace = context.workspace
|
|
|
|
screen = context.screen
|
2009-10-31 19:31:45 +00:00
|
|
|
scene = context.scene
|
2017-11-22 10:52:39 -02:00
|
|
|
layer = context.view_layer
|
2017-10-16 17:15:03 -02:00
|
|
|
view_render = workspace.view_render
|
2009-06-30 19:20:45 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
row = layout.row(align=True)
|
|
|
|
row.template_header()
|
2009-06-30 19:20:45 +00:00
|
|
|
|
2014-01-27 18:38:53 +11:00
|
|
|
INFO_MT_editor_menus.draw_collapsible(context, layout)
|
2009-06-30 19:20:45 +00:00
|
|
|
|
Main Workspace Integration
This commit does the main integration of workspaces, which is a design we agreed on during the 2.8 UI workshop (see https://wiki.blender.org/index.php/Dev:2.8/UI/Workshop_Writeup)
Workspaces should generally be stable, I'm not aware of any remaining bugs (or I've forgotten them :) ). If you find any, let me know!
(Exception: mode switching button might get out of sync with actual mode in some cases, would consider that a limitation/ToDo. Needs to be resolved at some point.)
== Main Changes/Features
* Introduces the new Workspaces as data-blocks.
* Allow storing a number of custom workspaces as part of the user configuration. Needs further work to allow adding and deleting individual workspaces.
* Bundle a default workspace configuration with Blender (current screen-layouts converted to workspaces).
* Pressing button to add a workspace spawns a menu to select between "Duplicate Current" and the workspaces from the user configuration. If no workspaces are stored in the user configuration, the default workspaces are listed instead.
* Store screen-layouts (`bScreen`) per workspace.
* Store an active screen-layout per workspace. Changing the workspace will enable this layout.
* Store active mode in workspace. Changing the workspace will also enter the mode of the new workspace. (Note that we still store the active mode in the object, moving this completely to workspaces is a separate project.)
* Store an active render layer per workspace.
* Moved mode switch from 3D View header to Info Editor header.
* Store active scene in window (not directly workspace related, but overlaps quite a bit).
* Removed 'Use Global Scene' User Preference option.
* Compatibility with old files - a new workspace is created for every screen-layout of old files. Old Blender versions should be able to read files saved with workspace support as well.
* Default .blend only contains one workspace ("General").
* Support appending workspaces.
Opening files without UI and commandline rendering should work fine.
Note that the UI is temporary! We plan to introduce a new global topbar
that contains the workspace options and tabs for switching workspaces.
== Technical Notes
* Workspaces are data-blocks.
* Adding and removing `bScreen`s should be done through `ED_workspace_layout` API now.
* A workspace can be active in multiple windows at the same time.
* The mode menu (which is now in the Info Editor header) doesn't display "Grease Pencil Edit" mode anymore since its availability depends on the active editor. Will be fixed by making Grease Pencil an own object type (as planned).
* The button to change the active workspace object mode may get out of sync with the mode of the active object. Will either be resolved by moving mode out of object data, or we'll disable workspace modes again (there's a `#define USE_WORKSPACE_MODE` for that).
* Screen-layouts (`bScreen`) are IDs and thus stored in a main list-base. Had to add a wrapper `WorkSpaceLayout` so we can store them in a list-base within workspaces, too. On the long run we could completely replace `bScreen` by workspace structs.
* `WorkSpace` types use some special compiler trickery to allow marking structs and struct members as private. BKE_workspace API should be used for accessing those.
* Added scene operators `SCENE_OT_`. Was previously done through screen operators.
== BPY API Changes
* Removed `Screen.scene`, added `Window.scene`
* Removed `UserPreferencesView.use_global_scene`
* Added `Context.workspace`, `Window.workspace` and `BlendData.workspaces`
* Added `bpy.types.WorkSpace` containing `screens`, `object_mode` and `render_layer`
* Added Screen.layout_name for the layout name that'll be displayed in the UI (may differ from internal name)
== What's left?
* There are a few open design questions (T50521). We should find the needed answers and implement them.
* Allow adding and removing individual workspaces from workspace configuration (needs UI design).
* Get the override system ready and support overrides per workspace.
* Support custom UI setups as part of workspaces (hidden panels, hidden buttons, customizable toolbars, etc).
* Allow enabling add-ons per workspace.
* Support custom workspace keymaps.
* Remove special exception for workspaces in linking code (so they're always appended, never linked). Depends on a few things, so best to solve later.
* Get the topbar done.
* Workspaces need a proper icon, current one is just a placeholder :)
Reviewed By: campbellbarton, mont29
Tags: #user_interface, #bf_blender_2.8
Maniphest Tasks: T50521
Differential Revision: https://developer.blender.org/D2451
2017-06-01 19:56:58 +02:00
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
if screen.show_fullscreen:
|
2011-09-21 15:18:38 +00:00
|
|
|
layout.operator("screen.back_to_previous", icon='SCREEN_BACK', text="Back to Previous")
|
2009-12-08 07:12:06 +00:00
|
|
|
layout.separator()
|
|
|
|
else:
|
Main Workspace Integration
This commit does the main integration of workspaces, which is a design we agreed on during the 2.8 UI workshop (see https://wiki.blender.org/index.php/Dev:2.8/UI/Workshop_Writeup)
Workspaces should generally be stable, I'm not aware of any remaining bugs (or I've forgotten them :) ). If you find any, let me know!
(Exception: mode switching button might get out of sync with actual mode in some cases, would consider that a limitation/ToDo. Needs to be resolved at some point.)
== Main Changes/Features
* Introduces the new Workspaces as data-blocks.
* Allow storing a number of custom workspaces as part of the user configuration. Needs further work to allow adding and deleting individual workspaces.
* Bundle a default workspace configuration with Blender (current screen-layouts converted to workspaces).
* Pressing button to add a workspace spawns a menu to select between "Duplicate Current" and the workspaces from the user configuration. If no workspaces are stored in the user configuration, the default workspaces are listed instead.
* Store screen-layouts (`bScreen`) per workspace.
* Store an active screen-layout per workspace. Changing the workspace will enable this layout.
* Store active mode in workspace. Changing the workspace will also enter the mode of the new workspace. (Note that we still store the active mode in the object, moving this completely to workspaces is a separate project.)
* Store an active render layer per workspace.
* Moved mode switch from 3D View header to Info Editor header.
* Store active scene in window (not directly workspace related, but overlaps quite a bit).
* Removed 'Use Global Scene' User Preference option.
* Compatibility with old files - a new workspace is created for every screen-layout of old files. Old Blender versions should be able to read files saved with workspace support as well.
* Default .blend only contains one workspace ("General").
* Support appending workspaces.
Opening files without UI and commandline rendering should work fine.
Note that the UI is temporary! We plan to introduce a new global topbar
that contains the workspace options and tabs for switching workspaces.
== Technical Notes
* Workspaces are data-blocks.
* Adding and removing `bScreen`s should be done through `ED_workspace_layout` API now.
* A workspace can be active in multiple windows at the same time.
* The mode menu (which is now in the Info Editor header) doesn't display "Grease Pencil Edit" mode anymore since its availability depends on the active editor. Will be fixed by making Grease Pencil an own object type (as planned).
* The button to change the active workspace object mode may get out of sync with the mode of the active object. Will either be resolved by moving mode out of object data, or we'll disable workspace modes again (there's a `#define USE_WORKSPACE_MODE` for that).
* Screen-layouts (`bScreen`) are IDs and thus stored in a main list-base. Had to add a wrapper `WorkSpaceLayout` so we can store them in a list-base within workspaces, too. On the long run we could completely replace `bScreen` by workspace structs.
* `WorkSpace` types use some special compiler trickery to allow marking structs and struct members as private. BKE_workspace API should be used for accessing those.
* Added scene operators `SCENE_OT_`. Was previously done through screen operators.
== BPY API Changes
* Removed `Screen.scene`, added `Window.scene`
* Removed `UserPreferencesView.use_global_scene`
* Added `Context.workspace`, `Window.workspace` and `BlendData.workspaces`
* Added `bpy.types.WorkSpace` containing `screens`, `object_mode` and `render_layer`
* Added Screen.layout_name for the layout name that'll be displayed in the UI (may differ from internal name)
== What's left?
* There are a few open design questions (T50521). We should find the needed answers and implement them.
* Allow adding and removing individual workspaces from workspace configuration (needs UI design).
* Get the override system ready and support overrides per workspace.
* Support custom UI setups as part of workspaces (hidden panels, hidden buttons, customizable toolbars, etc).
* Allow enabling add-ons per workspace.
* Support custom workspace keymaps.
* Remove special exception for workspaces in linking code (so they're always appended, never linked). Depends on a few things, so best to solve later.
* Get the topbar done.
* Workspaces need a proper icon, current one is just a placeholder :)
Reviewed By: campbellbarton, mont29
Tags: #user_interface, #bf_blender_2.8
Maniphest Tasks: T50521
Differential Revision: https://developer.blender.org/D2451
2017-06-01 19:56:58 +02:00
|
|
|
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)
|
|
|
|
|
2018-04-09 21:59:54 -04:00
|
|
|
if layer.objects.active:
|
|
|
|
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)
|
Main Workspace Integration
This commit does the main integration of workspaces, which is a design we agreed on during the 2.8 UI workshop (see https://wiki.blender.org/index.php/Dev:2.8/UI/Workshop_Writeup)
Workspaces should generally be stable, I'm not aware of any remaining bugs (or I've forgotten them :) ). If you find any, let me know!
(Exception: mode switching button might get out of sync with actual mode in some cases, would consider that a limitation/ToDo. Needs to be resolved at some point.)
== Main Changes/Features
* Introduces the new Workspaces as data-blocks.
* Allow storing a number of custom workspaces as part of the user configuration. Needs further work to allow adding and deleting individual workspaces.
* Bundle a default workspace configuration with Blender (current screen-layouts converted to workspaces).
* Pressing button to add a workspace spawns a menu to select between "Duplicate Current" and the workspaces from the user configuration. If no workspaces are stored in the user configuration, the default workspaces are listed instead.
* Store screen-layouts (`bScreen`) per workspace.
* Store an active screen-layout per workspace. Changing the workspace will enable this layout.
* Store active mode in workspace. Changing the workspace will also enter the mode of the new workspace. (Note that we still store the active mode in the object, moving this completely to workspaces is a separate project.)
* Store an active render layer per workspace.
* Moved mode switch from 3D View header to Info Editor header.
* Store active scene in window (not directly workspace related, but overlaps quite a bit).
* Removed 'Use Global Scene' User Preference option.
* Compatibility with old files - a new workspace is created for every screen-layout of old files. Old Blender versions should be able to read files saved with workspace support as well.
* Default .blend only contains one workspace ("General").
* Support appending workspaces.
Opening files without UI and commandline rendering should work fine.
Note that the UI is temporary! We plan to introduce a new global topbar
that contains the workspace options and tabs for switching workspaces.
== Technical Notes
* Workspaces are data-blocks.
* Adding and removing `bScreen`s should be done through `ED_workspace_layout` API now.
* A workspace can be active in multiple windows at the same time.
* The mode menu (which is now in the Info Editor header) doesn't display "Grease Pencil Edit" mode anymore since its availability depends on the active editor. Will be fixed by making Grease Pencil an own object type (as planned).
* The button to change the active workspace object mode may get out of sync with the mode of the active object. Will either be resolved by moving mode out of object data, or we'll disable workspace modes again (there's a `#define USE_WORKSPACE_MODE` for that).
* Screen-layouts (`bScreen`) are IDs and thus stored in a main list-base. Had to add a wrapper `WorkSpaceLayout` so we can store them in a list-base within workspaces, too. On the long run we could completely replace `bScreen` by workspace structs.
* `WorkSpace` types use some special compiler trickery to allow marking structs and struct members as private. BKE_workspace API should be used for accessing those.
* Added scene operators `SCENE_OT_`. Was previously done through screen operators.
== BPY API Changes
* Removed `Screen.scene`, added `Window.scene`
* Removed `UserPreferencesView.use_global_scene`
* Added `Context.workspace`, `Window.workspace` and `BlendData.workspaces`
* Added `bpy.types.WorkSpace` containing `screens`, `object_mode` and `render_layer`
* Added Screen.layout_name for the layout name that'll be displayed in the UI (may differ from internal name)
== What's left?
* There are a few open design questions (T50521). We should find the needed answers and implement them.
* Allow adding and removing individual workspaces from workspace configuration (needs UI design).
* Get the override system ready and support overrides per workspace.
* Support custom UI setups as part of workspaces (hidden panels, hidden buttons, customizable toolbars, etc).
* Allow enabling add-ons per workspace.
* Support custom workspace keymaps.
* Remove special exception for workspaces in linking code (so they're always appended, never linked). Depends on a few things, so best to solve later.
* Get the topbar done.
* Workspaces need a proper icon, current one is just a placeholder :)
Reviewed By: campbellbarton, mont29
Tags: #user_interface, #bf_blender_2.8
Maniphest Tasks: T50521
Differential Revision: https://developer.blender.org/D2451
2017-06-01 19:56:58 +02:00
|
|
|
|
2017-10-16 17:15:03 -02:00
|
|
|
row = layout.row()
|
|
|
|
row.active = not workspace.use_scene_settings
|
2017-12-01 15:47:24 +01:00
|
|
|
# Active workspace view-layer is retrieved through window, not through workspace.
|
|
|
|
row.template_search(window, "view_layer", scene, "view_layers")
|
2017-10-16 17:15:03 -02:00
|
|
|
|
|
|
|
if view_render.has_multiple_engines:
|
|
|
|
row.prop(view_render, "engine", text="")
|
2.5: Render/Game Engine
An engine to use for output can now be selected an influences what
shows in the buttons window, only showing relevant data. The idea
behind this is to make it more clear what is supported where, make
the system more pluggable for external render/game engines, and save
space hiding stuff that is not relevant anyway.
* Top header now has an engine menu, to choose between the blender
render engine, game engine, and other future external engines.
* If the game engine is enabled, the buttons window should show
only properties that work in the game engine, and similarly for
the render engine.
* Moved panels from the logic space and game tabs to the physics,
scene and world tabs instead, and removed the game tab.
* Materials and textures tabs should eventually become game
specific too, to better show what is supported.
2009-07-23 21:50:40 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2009-11-01 18:05:01 +00:00
|
|
|
|
Main Workspace Integration
This commit does the main integration of workspaces, which is a design we agreed on during the 2.8 UI workshop (see https://wiki.blender.org/index.php/Dev:2.8/UI/Workshop_Writeup)
Workspaces should generally be stable, I'm not aware of any remaining bugs (or I've forgotten them :) ). If you find any, let me know!
(Exception: mode switching button might get out of sync with actual mode in some cases, would consider that a limitation/ToDo. Needs to be resolved at some point.)
== Main Changes/Features
* Introduces the new Workspaces as data-blocks.
* Allow storing a number of custom workspaces as part of the user configuration. Needs further work to allow adding and deleting individual workspaces.
* Bundle a default workspace configuration with Blender (current screen-layouts converted to workspaces).
* Pressing button to add a workspace spawns a menu to select between "Duplicate Current" and the workspaces from the user configuration. If no workspaces are stored in the user configuration, the default workspaces are listed instead.
* Store screen-layouts (`bScreen`) per workspace.
* Store an active screen-layout per workspace. Changing the workspace will enable this layout.
* Store active mode in workspace. Changing the workspace will also enter the mode of the new workspace. (Note that we still store the active mode in the object, moving this completely to workspaces is a separate project.)
* Store an active render layer per workspace.
* Moved mode switch from 3D View header to Info Editor header.
* Store active scene in window (not directly workspace related, but overlaps quite a bit).
* Removed 'Use Global Scene' User Preference option.
* Compatibility with old files - a new workspace is created for every screen-layout of old files. Old Blender versions should be able to read files saved with workspace support as well.
* Default .blend only contains one workspace ("General").
* Support appending workspaces.
Opening files without UI and commandline rendering should work fine.
Note that the UI is temporary! We plan to introduce a new global topbar
that contains the workspace options and tabs for switching workspaces.
== Technical Notes
* Workspaces are data-blocks.
* Adding and removing `bScreen`s should be done through `ED_workspace_layout` API now.
* A workspace can be active in multiple windows at the same time.
* The mode menu (which is now in the Info Editor header) doesn't display "Grease Pencil Edit" mode anymore since its availability depends on the active editor. Will be fixed by making Grease Pencil an own object type (as planned).
* The button to change the active workspace object mode may get out of sync with the mode of the active object. Will either be resolved by moving mode out of object data, or we'll disable workspace modes again (there's a `#define USE_WORKSPACE_MODE` for that).
* Screen-layouts (`bScreen`) are IDs and thus stored in a main list-base. Had to add a wrapper `WorkSpaceLayout` so we can store them in a list-base within workspaces, too. On the long run we could completely replace `bScreen` by workspace structs.
* `WorkSpace` types use some special compiler trickery to allow marking structs and struct members as private. BKE_workspace API should be used for accessing those.
* Added scene operators `SCENE_OT_`. Was previously done through screen operators.
== BPY API Changes
* Removed `Screen.scene`, added `Window.scene`
* Removed `UserPreferencesView.use_global_scene`
* Added `Context.workspace`, `Window.workspace` and `BlendData.workspaces`
* Added `bpy.types.WorkSpace` containing `screens`, `object_mode` and `render_layer`
* Added Screen.layout_name for the layout name that'll be displayed in the UI (may differ from internal name)
== What's left?
* There are a few open design questions (T50521). We should find the needed answers and implement them.
* Allow adding and removing individual workspaces from workspace configuration (needs UI design).
* Get the override system ready and support overrides per workspace.
* Support custom UI setups as part of workspaces (hidden panels, hidden buttons, customizable toolbars, etc).
* Allow enabling add-ons per workspace.
* Support custom workspace keymaps.
* Remove special exception for workspaces in linking code (so they're always appended, never linked). Depends on a few things, so best to solve later.
* Get the topbar done.
* Workspaces need a proper icon, current one is just a placeholder :)
Reviewed By: campbellbarton, mont29
Tags: #user_interface, #bf_blender_2.8
Maniphest Tasks: T50521
Differential Revision: https://developer.blender.org/D2451
2017-06-01 19:56:58 +02:00
|
|
|
layout.template_ID(window, "scene", new="scene.new", unlink="scene.delete")
|
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2009-08-19 12:35:40 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
layout.template_running_jobs()
|
2010-03-06 01:40:29 +00:00
|
|
|
|
2010-06-03 07:27:55 +00:00
|
|
|
layout.template_reports_banner()
|
2011-07-29 01:24:03 +00:00
|
|
|
|
2011-07-23 15:36:51 +00:00
|
|
|
row = layout.row(align=True)
|
2013-06-10 00:42:16 +00:00
|
|
|
|
|
|
|
if bpy.app.autoexec_fail is True and bpy.app.autoexec_fail_quiet is False:
|
2014-12-01 10:59:53 +01:00
|
|
|
row.label("Auto-run disabled", icon='ERROR')
|
2013-06-10 02:05:38 +00:00
|
|
|
if bpy.data.is_saved:
|
2014-08-18 12:43:08 +02:00
|
|
|
props = row.operator("wm.revert_mainfile", icon='SCREEN_BACK', text="Reload Trusted")
|
2013-06-10 02:05:38 +00:00
|
|
|
props.use_scripts = True
|
|
|
|
|
2013-06-12 00:10:56 +00:00
|
|
|
row.operator("script.autoexec_warn_clear", text="Ignore")
|
2014-12-01 10:59:53 +01:00
|
|
|
|
|
|
|
# include last so text doesn't push buttons out of the header
|
|
|
|
row.label(bpy.app.autoexec_fail_message)
|
2013-06-10 00:42:16 +00:00
|
|
|
return
|
|
|
|
|
2011-07-23 15:36:51 +00:00
|
|
|
row.operator("wm.splash", text="", icon='BLENDER', emboss=False)
|
2018-04-05 18:20:27 +02:00
|
|
|
row.label(text=scene.statistics(context.view_layer), translate=False)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-11-11 13:36:57 +00:00
|
|
|
|
2014-01-27 18:38:53 +11:00
|
|
|
class INFO_MT_editor_menus(Menu):
|
|
|
|
bl_idname = "INFO_MT_editor_menus"
|
|
|
|
bl_label = ""
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
self.draw_menus(self.layout, context)
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
def draw_menus(layout, context):
|
2017-10-16 17:15:03 -02:00
|
|
|
view_render = context.view_render
|
2014-01-27 18:38:53 +11:00
|
|
|
|
|
|
|
layout.menu("INFO_MT_file")
|
|
|
|
|
2017-10-16 17:15:03 -02:00
|
|
|
if view_render.use_game_engine:
|
2014-01-27 18:38:53 +11:00
|
|
|
layout.menu("INFO_MT_game")
|
|
|
|
else:
|
|
|
|
layout.menu("INFO_MT_render")
|
|
|
|
|
|
|
|
layout.menu("INFO_MT_window")
|
|
|
|
layout.menu("INFO_MT_help")
|
|
|
|
|
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class INFO_MT_file(Menu):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "File"
|
2009-06-30 19:20:45 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2009-06-30 19:20:45 +00:00
|
|
|
|
2009-11-16 13:59:27 +00:00
|
|
|
layout.operator_context = 'INVOKE_AREA'
|
2012-04-10 15:56:33 +00:00
|
|
|
layout.operator("wm.read_homefile", text="New", icon='NEW')
|
2011-09-21 15:18:38 +00:00
|
|
|
layout.operator("wm.open_mainfile", text="Open...", icon='FILE_FOLDER')
|
2012-03-15 14:36:54 +00:00
|
|
|
layout.menu("INFO_MT_file_open_recent", icon='OPEN_RECENT')
|
2014-01-29 05:34:57 +11:00
|
|
|
layout.operator("wm.revert_mainfile", icon='FILE_REFRESH')
|
2010-05-03 03:33:20 +00:00
|
|
|
layout.operator("wm.recover_last_session", icon='RECOVER_LAST')
|
2012-03-15 14:36:54 +00:00
|
|
|
layout.operator("wm.recover_auto_save", text="Recover Auto Save...", icon='RECOVER_AUTO')
|
2009-06-30 19:20:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2009-06-30 19:20:45 +00:00
|
|
|
|
2013-01-15 23:15:32 +00:00
|
|
|
layout.operator_context = 'EXEC_AREA' if context.blend_data.is_saved else 'INVOKE_AREA'
|
2012-10-31 17:03:31 +00:00
|
|
|
layout.operator("wm.save_mainfile", text="Save", icon='FILE_TICK')
|
|
|
|
|
2009-11-16 13:59:27 +00:00
|
|
|
layout.operator_context = 'INVOKE_AREA'
|
2012-03-15 14:36:54 +00:00
|
|
|
layout.operator("wm.save_as_mainfile", text="Save As...", icon='SAVE_AS')
|
2010-07-19 17:45:03 +00:00
|
|
|
layout.operator_context = 'INVOKE_AREA'
|
2012-03-15 14:36:54 +00:00
|
|
|
layout.operator("wm.save_as_mainfile", text="Save Copy...", icon='SAVE_COPY').copy = True
|
2009-12-04 17:54:48 +00:00
|
|
|
|
2009-11-29 23:54:41 +00:00
|
|
|
layout.separator()
|
2009-12-04 17:54:48 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
layout.operator("screen.userpref_show", text="User Preferences...", icon='PREFERENCES')
|
2010-01-31 14:46:28 +00:00
|
|
|
|
2013-01-23 12:08:23 +00:00
|
|
|
layout.operator_context = 'INVOKE_AREA'
|
2012-03-15 14:36:54 +00:00
|
|
|
layout.operator("wm.save_homefile", icon='SAVE_PREFS')
|
|
|
|
layout.operator("wm.read_factory_settings", icon='LOAD_FACTORY')
|
2009-07-23 21:35:11 +00:00
|
|
|
|
2017-03-25 09:29:51 +11:00
|
|
|
if any(bpy.utils.app_template_paths()):
|
|
|
|
app_template = context.user_preferences.app_template
|
|
|
|
if app_template:
|
|
|
|
layout.operator(
|
|
|
|
"wm.read_factory_settings",
|
|
|
|
text="Load Factory Template Settings",
|
|
|
|
icon='LOAD_FACTORY',
|
|
|
|
).app_template = app_template
|
|
|
|
del app_template
|
|
|
|
|
|
|
|
layout.menu("USERPREF_MT_app_templates", icon='FILE_BLEND')
|
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2009-12-04 17:54:48 +00:00
|
|
|
|
2009-11-16 13:59:27 +00:00
|
|
|
layout.operator_context = 'INVOKE_AREA'
|
2014-09-04 19:35:18 +02:00
|
|
|
layout.operator("wm.link", text="Link", icon='LINK_BLEND')
|
|
|
|
layout.operator("wm.append", text="Append", icon='APPEND_BLEND')
|
2015-01-12 14:44:54 +01:00
|
|
|
layout.menu("INFO_MT_file_previews")
|
2009-12-04 17:54:48 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2009-07-23 21:35:11 +00:00
|
|
|
|
2012-03-15 14:36:54 +00:00
|
|
|
layout.menu("INFO_MT_file_import", icon='IMPORT')
|
|
|
|
layout.menu("INFO_MT_file_export", icon='EXPORT')
|
2009-06-30 19:20:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2009-06-30 19:20:45 +00:00
|
|
|
|
2012-03-15 14:36:54 +00:00
|
|
|
layout.menu("INFO_MT_file_external_data", icon='EXTERNAL_DATA')
|
2018-04-03 15:50:49 +02:00
|
|
|
layout.operator("wm.blend_strings_utf8_validate", icon='FILE_BLEND')
|
2009-06-30 19:20:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2009-07-23 21:35:11 +00:00
|
|
|
|
2009-11-16 13:59:27 +00:00
|
|
|
layout.operator_context = 'EXEC_AREA'
|
2014-01-17 08:42:07 +11:00
|
|
|
if bpy.data.is_dirty and context.user_preferences.view.use_quit_dialog:
|
2014-01-27 18:38:53 +11:00
|
|
|
layout.operator_context = 'INVOKE_SCREEN' # quit dialog
|
2011-09-21 15:18:38 +00:00
|
|
|
layout.operator("wm.quit_blender", text="Quit", icon='QUIT')
|
2009-07-23 21:35:11 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class INFO_MT_file_import(Menu):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_idname = "INFO_MT_file_import"
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Import"
|
2009-07-23 21:35:11 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
def draw(self, context):
|
2013-03-23 06:55:59 +00:00
|
|
|
if bpy.app.build_options.collada:
|
2012-05-20 17:40:57 +00:00
|
|
|
self.layout.operator("wm.collada_import", text="Collada (Default) (.dae)")
|
Basic Alembic support
All in all, this patch adds an Alembic importer, an Alembic exporter,
and a new CacheFile data block which, for now, wraps around an Alembic
archive. This data block is made available through a new modifier ("Mesh
Sequence Cache") as well as a new constraint ("Transform Cache") to
somewhat properly support respectively geometric and transformation data
streaming from alembic caches.
A more in-depth documentation is to be found on the wiki, as well as a
guide to compile alembic: https://wiki.blender.org/index.php/
User:Kevindietrich/AlembicBasicIo.
Many thanks to everyone involved in this little project, and huge shout
out to "cgstrive" for the thorough testings with Maya, 3ds Max, Houdini
and Realflow as well as @fjuhec, @jensverwiebe and @jasperge for the
custom builds and compile fixes.
Reviewers: sergey, campbellbarton, mont29
Reviewed By: sergey, campbellbarton, mont29
Differential Revision: https://developer.blender.org/D2060
2016-08-06 06:20:37 +02:00
|
|
|
if bpy.app.build_options.alembic:
|
|
|
|
self.layout.operator("wm.alembic_import", text="Alembic (.abc)")
|
2009-07-23 21:35:11 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class INFO_MT_file_export(Menu):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_idname = "INFO_MT_file_export"
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Export"
|
- add torus back from 2.4x as an operator
bpy.ops.mesh.primitive_torus_add(major_radius=1, minor_radius=0.25, major_segments=48, minor_segments=16)
- experemental dynamic menus, used for INFO_MT_file, INFO_MT_file_import, INFO_MT_file_export and INFO_MT_mesh_add. these can have items added from python.
eg.
- removed OBJECT_OT_mesh_add, use the python add menu instead.
- made mesh primitive ops - MESH_OT_primitive_plane_add, ...cube_add, etc. work in object mode.
- RNA scene.active_object wrapped
- bugfix [#19466] 2.5: Tweak menu only available for mesh objects added within Edit Mode
ED_object_exit_editmode was always doing an undo push, made this optional using the existing flag - EM_DO_UNDO, called everywhere except when adding primitives.
2009-10-10 21:23:20 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
def draw(self, context):
|
2013-03-23 06:55:59 +00:00
|
|
|
if bpy.app.build_options.collada:
|
2012-05-20 17:40:57 +00:00
|
|
|
self.layout.operator("wm.collada_export", text="Collada (Default) (.dae)")
|
Basic Alembic support
All in all, this patch adds an Alembic importer, an Alembic exporter,
and a new CacheFile data block which, for now, wraps around an Alembic
archive. This data block is made available through a new modifier ("Mesh
Sequence Cache") as well as a new constraint ("Transform Cache") to
somewhat properly support respectively geometric and transformation data
streaming from alembic caches.
A more in-depth documentation is to be found on the wiki, as well as a
guide to compile alembic: https://wiki.blender.org/index.php/
User:Kevindietrich/AlembicBasicIo.
Many thanks to everyone involved in this little project, and huge shout
out to "cgstrive" for the thorough testings with Maya, 3ds Max, Houdini
and Realflow as well as @fjuhec, @jensverwiebe and @jasperge for the
custom builds and compile fixes.
Reviewers: sergey, campbellbarton, mont29
Reviewed By: sergey, campbellbarton, mont29
Differential Revision: https://developer.blender.org/D2060
2016-08-06 06:20:37 +02:00
|
|
|
if bpy.app.build_options.alembic:
|
|
|
|
self.layout.operator("wm.alembic_export", text="Alembic (.abc)")
|
2009-07-23 21:35:11 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class INFO_MT_file_external_data(Menu):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "External Data"
|
2009-06-30 19:20:45 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2009-06-30 19:20:45 +00:00
|
|
|
|
2013-12-23 18:35:32 +01:00
|
|
|
icon = 'CHECKBOX_HLT' if bpy.data.use_autopack else 'CHECKBOX_DEHLT'
|
|
|
|
layout.operator("file.autopack_toggle", icon=icon)
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
pack_all = layout.row()
|
|
|
|
pack_all.operator("file.pack_all")
|
|
|
|
pack_all.active = not bpy.data.use_autopack
|
|
|
|
|
|
|
|
unpack_all = layout.row()
|
|
|
|
unpack_all.operator("file.unpack_all")
|
|
|
|
unpack_all.active = not bpy.data.use_autopack
|
2009-06-30 19:20:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2009-06-30 19:20:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.operator("file.make_paths_relative")
|
|
|
|
layout.operator("file.make_paths_absolute")
|
|
|
|
layout.operator("file.report_missing_files")
|
|
|
|
layout.operator("file.find_missing_files")
|
2009-06-30 19:20:45 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2015-01-12 14:44:54 +01:00
|
|
|
class INFO_MT_file_previews(Menu):
|
|
|
|
bl_label = "Data Previews"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
layout.operator("wm.previews_ensure")
|
2015-08-10 17:26:37 +02:00
|
|
|
layout.operator("wm.previews_batch_generate")
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
layout.operator("wm.previews_clear")
|
|
|
|
layout.operator("wm.previews_batch_clear")
|
2015-01-12 14:44:54 +01:00
|
|
|
|
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class INFO_MT_game(Menu):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Game"
|
2009-06-30 19:20:45 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2009-07-23 21:35:11 +00:00
|
|
|
|
2010-08-18 08:26:18 +00:00
|
|
|
gs = context.scene.game_settings
|
2009-08-18 15:27:48 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.operator("view3d.game_start")
|
2009-06-30 19:20:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2009-08-18 15:27:48 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.prop(gs, "show_debug_properties")
|
|
|
|
layout.prop(gs, "show_framerate_profile")
|
|
|
|
layout.prop(gs, "show_physics_visualization")
|
2010-02-22 12:25:58 +00:00
|
|
|
layout.prop(gs, "use_deprecation_warnings")
|
|
|
|
layout.prop(gs, "use_animation_record")
|
2010-03-05 10:37:55 +00:00
|
|
|
layout.separator()
|
2010-08-20 06:09:58 +00:00
|
|
|
layout.prop(gs, "use_auto_start")
|
2009-08-18 15:27:48 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class INFO_MT_render(Menu):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Render"
|
2009-06-30 19:20:45 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2009-07-23 21:35:11 +00:00
|
|
|
|
2014-02-05 13:32:35 +01:00
|
|
|
layout.operator("render.render", text="Render Image", icon='RENDER_STILL').use_viewport = True
|
|
|
|
props = layout.operator("render.render", text="Render Animation", icon='RENDER_ANIMATION')
|
|
|
|
props.animation = True
|
|
|
|
props.use_viewport = True
|
2009-07-23 21:35:11 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2009-10-28 18:03:04 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
layout.operator("render.opengl", text="OpenGL Render Image")
|
|
|
|
layout.operator("render.opengl", text="OpenGL Render Animation").animation = True
|
2014-03-15 16:47:03 +01:00
|
|
|
layout.menu("INFO_MT_opengl_render")
|
2009-10-28 18:03:04 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-03-08 16:36:53 +00:00
|
|
|
layout.operator("render.view_show")
|
2013-12-14 09:14:33 +01:00
|
|
|
layout.operator("render.play_rendered_anim", icon='PLAY')
|
2012-05-01 13:32:55 +00:00
|
|
|
|
|
|
|
|
2014-03-15 16:47:03 +01:00
|
|
|
class INFO_MT_opengl_render(Menu):
|
|
|
|
bl_label = "OpenGL Render Options"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2014-04-03 09:24:09 +11:00
|
|
|
|
2014-03-15 16:47:03 +01:00
|
|
|
rd = context.scene.render
|
|
|
|
layout.prop(rd, "use_antialiasing")
|
2015-11-12 00:06:26 +11:00
|
|
|
layout.prop(rd, "use_full_sample")
|
|
|
|
|
2014-03-15 16:47:03 +01:00
|
|
|
layout.prop_menu_enum(rd, "antialiasing_samples")
|
|
|
|
layout.prop_menu_enum(rd, "alpha_mode")
|
|
|
|
|
|
|
|
|
2012-05-01 13:32:55 +00:00
|
|
|
class INFO_MT_window(Menu):
|
2012-04-30 19:37:04 +00:00
|
|
|
bl_label = "Window"
|
2012-05-01 13:32:55 +00:00
|
|
|
|
2012-04-30 19:37:04 +00:00
|
|
|
def draw(self, context):
|
|
|
|
import sys
|
2012-05-01 13:32:55 +00:00
|
|
|
|
2012-04-30 19:37:04 +00:00
|
|
|
layout = self.layout
|
2012-05-01 13:32:55 +00:00
|
|
|
|
2017-03-13 10:43:49 +01:00
|
|
|
layout.operator("wm.window_new")
|
2012-04-30 19:37:04 +00:00
|
|
|
layout.operator("wm.window_fullscreen_toggle", icon='FULLSCREEN_ENTER')
|
2013-01-28 23:06:27 +00:00
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
2015-01-29 17:34:05 +01:00
|
|
|
layout.operator("screen.screenshot")
|
|
|
|
layout.operator("screen.screencast")
|
2013-01-28 23:06:27 +00:00
|
|
|
|
2012-04-30 19:37:04 +00:00
|
|
|
if sys.platform[:3] == "win":
|
|
|
|
layout.separator()
|
|
|
|
layout.operator("wm.console_toggle", icon='CONSOLE')
|
2012-05-01 13:32:55 +00:00
|
|
|
|
2015-04-06 10:40:12 -03:00
|
|
|
if context.scene.render.use_multiview:
|
|
|
|
layout.separator()
|
|
|
|
layout.operator("wm.set_stereo_3d", icon='CAMERA_STEREO')
|
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class INFO_MT_help(Menu):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Help"
|
2009-06-30 19:20:45 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2009-07-23 21:35:11 +00:00
|
|
|
|
2016-07-20 06:34:54 +10:00
|
|
|
layout.operator(
|
|
|
|
"wm.url_open", text="Manual", icon='HELP',
|
2017-01-23 19:09:45 -05:00
|
|
|
).url = "https://docs.blender.org/manual/en/dev/"
|
2016-07-20 06:34:54 +10:00
|
|
|
layout.operator(
|
|
|
|
"wm.url_open", text="Release Log", icon='URL',
|
|
|
|
).url = "http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/%d.%d" % bpy.app.version[:2]
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2009-07-23 21:35:11 +00:00
|
|
|
|
2016-07-20 06:34:54 +10:00
|
|
|
layout.operator(
|
|
|
|
"wm.url_open", text="Blender Website", icon='URL',
|
|
|
|
).url = "https://www.blender.org"
|
|
|
|
layout.operator(
|
|
|
|
"wm.url_open", text="Blender Store", icon='URL',
|
|
|
|
).url = "https://store.blender.org"
|
|
|
|
layout.operator(
|
|
|
|
"wm.url_open", text="Developer Community", icon='URL',
|
|
|
|
).url = "https://www.blender.org/get-involved/"
|
|
|
|
layout.operator(
|
|
|
|
"wm.url_open", text="User Community", icon='URL',
|
|
|
|
).url = "https://www.blender.org/support/user-community"
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2016-07-20 06:34:54 +10:00
|
|
|
layout.operator(
|
|
|
|
"wm.url_open", text="Report a Bug", icon='URL',
|
|
|
|
).url = "https://developer.blender.org/maniphest/task/edit/form/1"
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2011-04-14 14:13:04 +00:00
|
|
|
|
2016-07-20 06:34:54 +10:00
|
|
|
layout.operator(
|
|
|
|
"wm.url_open", text="Python API Reference", icon='URL',
|
|
|
|
).url = bpy.types.WM_OT_doc_view._prefix
|
|
|
|
|
2011-09-22 19:50:41 +00:00
|
|
|
layout.operator("wm.operator_cheat_sheet", icon='TEXT')
|
2010-10-16 17:26:40 +00:00
|
|
|
layout.operator("wm.sysinfo", icon='TEXT')
|
2010-08-29 15:40:48 +00:00
|
|
|
layout.separator()
|
2012-05-01 13:32:55 +00:00
|
|
|
|
2011-02-27 17:11:56 +00:00
|
|
|
layout.operator("wm.splash", icon='BLENDER')
|
2009-06-30 19:20:45 +00:00
|
|
|
|
2017-03-18 20:03:24 +11:00
|
|
|
|
|
|
|
classes = (
|
|
|
|
INFO_HT_header,
|
|
|
|
INFO_MT_editor_menus,
|
|
|
|
INFO_MT_file,
|
2017-03-20 02:34:32 +11:00
|
|
|
INFO_MT_file_import,
|
2017-03-18 20:03:24 +11:00
|
|
|
INFO_MT_file_export,
|
|
|
|
INFO_MT_file_external_data,
|
|
|
|
INFO_MT_file_previews,
|
|
|
|
INFO_MT_game,
|
|
|
|
INFO_MT_render,
|
2017-03-20 02:34:32 +11:00
|
|
|
INFO_MT_opengl_render,
|
2017-03-18 20:03:24 +11:00
|
|
|
INFO_MT_window,
|
2017-03-20 02:34:32 +11:00
|
|
|
INFO_MT_help,
|
2017-03-18 20:03:24 +11:00
|
|
|
)
|
|
|
|
|
2011-04-04 10:13:04 +00:00
|
|
|
if __name__ == "__main__": # only for live edit.
|
2017-03-18 20:03:24 +11:00
|
|
|
from bpy.utils import register_class
|
|
|
|
for cls in classes:
|
|
|
|
register_class(cls)
|