Blender Git Loki

Git Commits -> Revision 5f6c454

Revision 5f6c454 by Julian Eisel (master)
April 20, 2018, 15:14 (GMT)
UI: New Global Top-Bar (WIP)

== Main Features/Changes for Users

* Add horizontal bar at top of all non-temp windows, consisting out of two horizontal sub-bars.
* Upper sub-bar contains global menus (File, Render, etc.), tabs for workspaces and scene selector.
* Lower sub-bar contains object mode selector, screen-layout and render-layer selector. Later operator and/or tool settings will be placed here.
* Individual sections of the topbar are individually scrollable.
* Workspace tabs can be double- or ctrl-clicked for renaming and contain 'x' icon for deleting.
* Top-bar should scale nicely with DPI.
* The lower half of the top-bar can be hided by dragging the lower top-bar edge up. Better hiding options are planned (e.g. hide in fullscreen modes).
* Info editors at the top of the window and using the full window width with be replaced by the top-bar.
* In fullscreen modes, no more info editor is added on top, the top-bar replaces it.

== Technical Features/Changes

* Adds initial support for global areas

A global area is part of the window, not part of the regular screen-layout.
I've added a macro iterator to iterate over both, global and screen-layout level areas. When iterating over areas, from now on developers should always consider if they have to include global areas.
* Adds a TOPBAR editor type

The editor type is hidden in the UI editor type menu.
* Adds a variation of the ID template to display IDs as tab buttons (template_ID_tabs in BPY)
* Does various changes to RNA button creation code to improve their appearance in the horizontal top-bar.
* Adds support for dynamically sized regions. That is, regions that scale automatically to the layout bounds.

The code for this is currently a big hack (it's based on drawing the UI multiple times). This should definitely be improved.
* Adds a template for displaying operator properties optimized for the top-bar. This will probably change a lot still and is in fact disabled in code.

Since the final top-bar design depends a lot on other 2.8 designs (mainly tool-system and workspaces), we decided to not show the operator or tool settings in the top-bar for now. That means most of the lower sub-bar is empty for the time being.

NOTE: Top-bar or global area data is not written to files or SDNA. They are simply added to the window when opening Blender or reading a file. This allows us doing changes to the top-bar without having to care for compatibility.

== ToDo's

It's a bit hard to predict all the ToDo's here are the known main ones:
* Add options for the new active-tool system and for operator redo to the topbar.
* Automatically hide the top-bar in fullscreen modes.
* General visual polish.
* Top-bar drag & drop support (WIP in temp-tab_drag_drop).
* Improve dynamic regions (should also fix some layout glitches).
* Make internal terminology consistent.
* Enable topbar file writing once design is more advanced.
* Address TODO's and XXX's in code :)

Thanks @brecht for the review! And @sergey for the complaining ;)

Differential Revision: D2758

Commit Details:

Full Hash: 5f6c45498c92b91a710a1317f6d41f73fbe83477
Parent Commit: 4bfb6d2
Lines Changed: +2497, -593

3 Added Paths:

/release/scripts/startup/bl_ui/space_topbar.py (+401, -0) (View)
/source/blender/editors/space_topbar/CMakeLists.txt (+45, -0) (View)
/source/blender/editors/space_topbar/space_topbar.c (+265, -0) (View)

65 Modified Paths:

/build_files/cmake/macros.cmake (+1, -0) (Diff)
/release/scripts/startup/bl_ui/space_userpref.py (+3, -0) (Diff)
/release/scripts/startup/bl_ui/__init__.py (+1, -0) (Diff)
/source/blender/blenkernel/BKE_context.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_screen.h (+3, -0) (Diff)
/source/blender/blenkernel/intern/context.c (+8, -0) (Diff)
/source/blender/blenkernel/intern/screen.c (+16, -11) (Diff)
/source/blender/blenloader/intern/readblenentry.c (+1, -1) (Diff)
/source/blender/blenloader/intern/readfile.c (+66, -54) (Diff)
/source/blender/blenloader/intern/versioning_280.c (+57, -0) (Diff)
/source/blender/blenloader/intern/writefile.c (+31, -14) (Diff)
/source/blender/editors/CMakeLists.txt (+1, -0) (Diff)
/source/blender/editors/gpencil/gpencil_convert.c (+1, -1) (Diff)
/source/blender/editors/include/ED_screen.h (+23, -0) (Diff)
/source/blender/editors/include/ED_space_api.h (+1, -0) (Diff)
/source/blender/editors/include/ED_undo.h (+12, -0) (Diff)
/source/blender/editors/include/ED_util.h (+2, -3) (Diff)
/source/blender/editors/include/UI_interface.h (+44, -7) (Diff)
/source/blender/editors/include/UI_resources.h (+2, -2) (Diff)
/source/blender/editors/interface/interface.c (+63, -19) (Diff)
/source/blender/editors/interface/interface_align.c (+41, -4) (Diff)
/source/blender/editors/interface/interface_handlers.c (+61, -21) (Diff)
/source/blender/editors/interface/interface_intern.h (+6, -1) (Diff)
/source/blender/editors/interface/interface_layout.c (+65, -30) (Diff)
/source/blender/editors/interface/interface_templates.c (+227, -68) (Diff)
/source/blender/editors/interface/interface_utils.c (+43, -33) (Diff)
/source/blender/editors/interface/interface_widgets.c (+18, -5) (Diff)
/source/blender/editors/interface/resources.c (+20, -2) (Diff)
/source/blender/editors/mesh/editmesh_tools.c (+1, -1) (Diff)
/source/blender/editors/object/object_data_transfer.c (+1, -1) (Diff)
/source/blender/editors/object/object_relations.c (+1, -1) (Diff)
/source/blender/editors/screen/area.c (+124, -26) (Diff)
/source/blender/editors/screen/screendump.c (+1, -1) (Diff)
/source/blender/editors/screen/screen_edit.c (+227, -117) (Diff)
/source/blender/editors/screen/screen_intern.h (+9, -4) (Diff)
/source/blender/editors/screen/screen_ops.c (+151, -54) (Diff)
/source/blender/editors/screen/workspace_edit.c (+1, -3) (Diff)
/source/blender/editors/screen/workspace_layout_edit.c (+3, -3) (Diff)
/source/blender/editors/sound/sound_ops.c (+1, -1) (Diff)
/source/blender/editors/space_api/spacetypes.c (+1, -0) (Diff)
/source/blender/editors/space_clip/clip_toolbar.c (+20, -3) (Diff)
/source/blender/editors/space_clip/space_clip.c (+18, -3) (Diff)
/source/blender/editors/space_file/file_panels.c (+2, -1) (Diff)
/source/blender/editors/space_image/image_ops.c (+2, -2) (Diff)
/source/blender/editors/space_sequencer/sequencer_add.c (+1, -1) (Diff)
/source/blender/editors/space_view3d/space_view3d.c (+32, -13) (Diff)
/source/blender/editors/space_view3d/view3d_toolbar.c (+7, -2) (Diff)
/source/blender/editors/undo/ed_undo.c (+42, -1) (Diff)
/source/blender/makesdna/DNA_screen_types.h (+55, -5) (Diff)
/source/blender/makesdna/DNA_space_types.h (+28, -2) (Diff)
/source/blender/makesdna/DNA_userdef_types.h (+2, -1) (Diff)
/source/blender/makesdna/DNA_view3d_types.h (+1, -1) (Diff)
/source/blender/makesdna/DNA_windowmanager_types.h (+9, -0) (Diff)
/source/blender/makesrna/intern/rna_screen.c (+46, -2) (Diff)
/source/blender/makesrna/intern/rna_space.c (+3, -0) (Diff)
/source/blender/makesrna/intern/rna_ui.c (+11, -2) (Diff)
/source/blender/makesrna/intern/rna_ui_api.c (+15, -0) (Diff)
/source/blender/makesrna/intern/rna_userdef.c (+27, -0) (Diff)
/source/blender/windowmanager/intern/wm.c (+7, -1) (Diff)
/source/blender/windowmanager/intern/wm_draw.c (+36, -39) (Diff)
/source/blender/windowmanager/intern/wm_event_system.c (+40, -15) (Diff)
/source/blender/windowmanager/intern/wm_operators.c (+7, -4) (Diff)
/source/blender/windowmanager/intern/wm_window.c (+30, -4) (Diff)
/source/blender/windowmanager/WM_api.h (+5, -3) (Diff)
/source/blender/windowmanager/WM_types.h (+1, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021