Blender Git Loki

Git Commits -> Revision 7f564d7

Revision 7f564d7 by Julian Eisel (master)
June 1, 2017, 17:59 (GMT)
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

Commit Details:

Full Hash: 7f564d74f9edaaa41ce27c6e854869096f70b4da
Parent Commit: 0af93cf
Lines Changed: +3636, -1065

10 Added Paths:

/release/datafiles/workspaces.blend (+0, -0) (View)
/source/blender/blenkernel/BKE_workspace.h (+116, -0) (View)
/source/blender/blenkernel/intern/workspace.c (+399, -0) (View)
/source/blender/editors/include/ED_scene.h (+40, -0) (View)
/source/blender/editors/scene/CMakeLists.txt (+43, -0) (View)
/source/blender/editors/scene/scene_edit.c (+202, -0) (View)
/source/blender/editors/screen/workspace_edit.c (+426, -0) (View)
/source/blender/editors/screen/workspace_layout_edit.c (+198, -0) (View)
/source/blender/makesdna/dna_workspace_types.h (+132, -0) (View)
/source/blender/makesrna/intern/rna_workspace.c (+144, -0) (View)

121 Modified Paths:

/build_files/cmake/macros.cmake (+1, -0) (Diff)
/doc/doxygen/doxygen.source.h (+4, -0) (Diff)
/release/scripts/startup/bl_ui/space_info.py (+18, -3) (Diff)
/release/scripts/startup/bl_ui/space_userpref.py (+3, -2) (Diff)
/source/blender/blenkernel/BKE_appdir.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_blender_version.h (+1, -1) (Diff)
/source/blender/blenkernel/BKE_blendfile.h (+4, -0) (Diff)
/source/blender/blenkernel/BKE_context.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_layer.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_library.h (+1, -1) (Diff)
/source/blender/blenkernel/BKE_main.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_scene.h (+7, -5) (Diff)
/source/blender/blenkernel/BKE_screen.h (+3, -2) (Diff)
/source/blender/blenkernel/CMakeLists.txt (+2, -0) (Diff)
/source/blender/blenkernel/intern/blendfile.c (+72, -22) (Diff)
/source/blender/blenkernel/intern/context.c (+12, -6) (Diff)
/source/blender/blenkernel/intern/idcode.c (+4, -1) (Diff)
/source/blender/blenkernel/intern/image.c (+4, -2) (Diff)
/source/blender/blenkernel/intern/layer.c (+18, -5) (Diff)
/source/blender/blenkernel/intern/library.c (+12, -0) (Diff)
/source/blender/blenkernel/intern/library_query.c (+37, -8) (Diff)
/source/blender/blenkernel/intern/library_remap.c (+4, -0) (Diff)
/source/blender/blenkernel/intern/scene.c (+7, -3) (Diff)
/source/blender/blenkernel/intern/screen.c (+15, -21) (Diff)
/source/blender/blenloader/BLO_readfile.h (+16, -4) (Diff)
/source/blender/blenloader/intern/readfile.c (+216, -70) (Diff)
/source/blender/blenloader/intern/versioning_280.c (+111, -22) (Diff)
/source/blender/blenloader/intern/versioning_defaults.c (+33, -7) (Diff)
/source/blender/blenloader/intern/writefile.c (+45, -8) (Diff)
/source/blender/blentranslation/BLT_translation.h (+2, -0) (Diff)
/source/blender/CMakeLists.txt (+1, -0) (Diff)
/source/blender/depsgraph/intern/depsgraph_tag.cc (+1, -0) (Diff)
/source/blender/editors/animation/anim_markers.c (+2, -2) (Diff)
/source/blender/editors/CMakeLists.txt (+2, -1) (Diff)
/source/blender/editors/include/ED_screen.h (+40, -7) (Diff)
/source/blender/editors/include/ED_view3d.h (+4, -3) (Diff)
/source/blender/editors/interface/interface.c (+8, -3) (Diff)
/source/blender/editors/interface/interface_eyedropper.c (+9, -10) (Diff)
/source/blender/editors/interface/interface_regions.c (+6, -1) (Diff)
/source/blender/editors/interface/interface_templates.c (+3, -1) (Diff)
/source/blender/editors/interface/interface_utils.c (+1, -2) (Diff)
/source/blender/editors/interface/resources.c (+10, -7) (Diff)
/source/blender/editors/object/object_add.c (+2, -2) (Diff)
/source/blender/editors/object/object_edit.c (+19, -1) (Diff)
/source/blender/editors/object/object_select.c (+7, -1) (Diff)
/source/blender/editors/render/render_internal.c (+6, -4) (Diff)
/source/blender/editors/render/render_update.c (+3, -1) (Diff)
/source/blender/editors/render/render_view.c (+9, -6) (Diff)
/source/blender/editors/screen/area.c (+8, -3) (Diff)
/source/blender/editors/screen/CMakeLists.txt (+3, -0) (Diff)
/source/blender/editors/screen/screen_context.c (+6, -2) (Diff)
/source/blender/editors/screen/screen_draw.c (+5, -4) (Diff)
/source/blender/editors/screen/screen_edit.c (+158, -269) (Diff)
/source/blender/editors/screen/screen_intern.h (+10, -1) (Diff)
/source/blender/editors/screen/screen_ops.c (+52, -177) (Diff)
/source/blender/editors/sculpt_paint/paint_image.c (+10, -6) (Diff)
/source/blender/editors/space_action/space_action.c (+5, -1) (Diff)
/source/blender/editors/space_api/spacetypes.c (+3, -0) (Diff)
/source/blender/editors/space_buttons/space_buttons.c (+15, -0) (Diff)
/source/blender/editors/space_clip/clip_editor.c (+4, -7) (Diff)
/source/blender/editors/space_file/filesel.c (+1, -1) (Diff)
/source/blender/editors/space_file/file_utils.c (+1, -0) (Diff)
/source/blender/editors/space_graph/space_graph.c (+5, -0) (Diff)
/source/blender/editors/space_image/space_image.c (+6, -1) (Diff)
/source/blender/editors/space_info/space_info.c (+2, -1) (Diff)
/source/blender/editors/space_nla/space_nla.c (+5, -0) (Diff)
/source/blender/editors/space_node/node_edit.c (+1, -1) (Diff)
/source/blender/editors/space_node/space_node.c (+2, -1) (Diff)
/source/blender/editors/space_outliner/outliner_intern.h (+1, -1) (Diff)
/source/blender/editors/space_outliner/outliner_select.c (+3, -3) (Diff)
/source/blender/editors/space_outliner/outliner_tools.c (+7, -5) (Diff)
/source/blender/editors/space_outliner/space_outliner.c (+5, -0) (Diff)
/source/blender/editors/space_time/space_time.c (+5, -0) (Diff)
/source/blender/editors/space_view3d/space_view3d.c (+17, -13) (Diff)
/source/blender/editors/space_view3d/view3d_draw_legacy.c (+3, -4) (Diff)
/source/blender/editors/space_view3d/view3d_header.c (+3, -38) (Diff)
/source/blender/editors/space_view3d/view3d_view.c (+6, -4) (Diff)
/source/blender/editors/transform/transform_ops.c (+2, -2) (Diff)
/source/blender/editors/transform/transform_orientations.c (+3, -1) (Diff)
/source/blender/editors/util/CMakeLists.txt (+1, -0) (Diff)
/source/blender/imbuf/intern/thumbs_blend.c (+1, -0) (Diff)
/source/blender/makesdna/DNA_defs.h (+6, -0) (Diff)
/source/blender/makesdna/DNA_fileglobal_types.h (+3, -3) (Diff)
/source/blender/makesdna/DNA_ID.h (+4, -1) (Diff)
/source/blender/makesdna/DNA_screen_types.h (+4, -4) (Diff)
/source/blender/makesdna/DNA_userdef_types.h (+1, -1) (Diff)
/source/blender/makesdna/DNA_windowmanager_types.h (+7, -3) (Diff)
/source/blender/makesdna/intern/makesdna.c (+18, -0) (Diff)
/source/blender/makesrna/intern/CMakeLists.txt (+1, -0) (Diff)
/source/blender/makesrna/intern/makesrna.c (+1, -0) (Diff)
/source/blender/makesrna/intern/rna_context.c (+11, -0) (Diff)
/source/blender/makesrna/intern/rna_ID.c (+3, -0) (Diff)
/source/blender/makesrna/intern/rna_internal.h (+2, -0) (Diff)
/source/blender/makesrna/intern/rna_main.c (+7, -0) (Diff)
/source/blender/makesrna/intern/rna_main_api.c (+29, -3) (Diff)
/source/blender/makesrna/intern/rna_scene.c (+5, -3) (Diff)
/source/blender/makesrna/intern/rna_screen.c (+44, -42) (Diff)
/source/blender/makesrna/intern/rna_space.c (+31, -22) (Diff)
/source/blender/makesrna/intern/rna_space_api.c (+6, -4) (Diff)
/source/blender/makesrna/intern/rna_userdef.c (+0, -5) (Diff)
/source/blender/makesrna/intern/rna_wm.c (+124, -18) (Diff)
/source/blender/makesrna/RNA_access.h (+1, -0) (Diff)
/source/blender/python/intern/bpy_library_load.c (+4, -3) (Diff)
/source/blender/python/intern/bpy_rna.c (+1, -1) (Diff)
/source/blender/windowmanager/intern/wm.c (+5, -3) (Diff)
/source/blender/windowmanager/intern/wm_draw.c (+39, -30) (Diff)
/source/blender/windowmanager/intern/wm_event_system.c (+71, -34) (Diff)
/source/blender/windowmanager/intern/wm_files.c (+57, -15) (Diff)
/source/blender/windowmanager/intern/wm_files_link.c (+56, -4) (Diff)
/source/blender/windowmanager/intern/wm_init_exit.c (+1, -1) (Diff)
/source/blender/windowmanager/intern/wm_operators.c (+7, -2) (Diff)
/source/blender/windowmanager/intern/wm_stereo.c (+9, -6) (Diff)
/source/blender/windowmanager/intern/wm_subwindow.c (+3, -1) (Diff)
/source/blender/windowmanager/intern/wm_window.c (+189, -55) (Diff)
/source/blender/windowmanager/WM_api.h (+15, -0) (Diff)
/source/blender/windowmanager/wm_files.h (+1, -0) (Diff)
/source/blender/windowmanager/WM_types.h (+6, -5) (Diff)
/source/blender/windowmanager/wm_window.h (+2, -2) (Diff)
/source/blenderplayer/bad_level_call_stubs/stubs.c (+7, -1) (Diff)
/source/creator/CMakeLists.txt (+6, -0) (Diff)
/source/gameengine/BlenderRoutines/KX_BlenderCanvas.cpp (+1, -2) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021