Age | Commit message (Collapse) | Author |
|
|
|
|
|
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
|
|
|
|
|
|
Tested for multi-window as well, which failed with the previous code even
before we introduced ordered workspaces.
|
|
Delete workspaces via the menu was not refreshing the workspace tabs
drawing. This way if you deleted the non-active workspace with the "e" shortcut
from the workspace tab context menu and clicked on the workspace tabs again, it
would crash.
A few notes:
* Deleting a non-active workspace is changing which workspace is then active,
which is really strange.
* Even when deleting the active workspace which workspace then becomes active
seems random.
* Using notifiers (ND_WORKSPACE_DELETE) to delete the workspace seems rather
abusing notifiers in my humble opinion.
This is not an important bugfix anyways, people probably would rarely
run into this. I just ran into it while investigating another bug.
|
|
Convention was not to but after discussion on 918941483f7e we agree its
best to change the convention.
Names now mostly follow RNA.
Some exceptions:
- Use 'nodetrees' instead of 'nodegroups'
since the struct is called NodeTree.
- Use 'gpencils' instead of 'grease_pencil'
since 'gpencil' is a common abbreviation in the C code.
Other exceptions:
- Leave 'wm' as it's a list of one.
- Leave 'ipo' as is for versioning.
|
|
Rename latt to lattice and don't use plural names.
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.
|
|
|
|
|
|
Area initialization handles these cases now.
|
|
Makes it simpler to make some changes...
Also fix order of some includes (use alphabetical please).
|
|
* Area and Workspace duplicate.
* Toggle Area Fullscreen
* Operator Search
* Workspace reorder to front/back (arrows help to know which direction means front/back)
|
|
|
|
The goal here is to make app templates usable for default templates
that we can ship with Blender. These only have a custom startup.blend
currently and so are quite limited compared to app templates that fully
customize Blender.
But still it seems like the same kind of concept where we should be
sharing the code and UI. It is useful to be able to save a startup.blend
per template, and I can imagine some scripting being useful in the future
as well.
Changes made:
* File > New and Ctrl+N now list the templates, replacing a separate
Application Templates menu that was not as easy to discover.
* File menu now shows name of active template above Save Startup File
and Load Factory Settings to indicate these are saved/loaded per
template.
* The "Default" template was renamed to "General".
* Workspaces can now be added from any of the template startup.blend
files when clicking the (+) button in the topbar.
* User preferences are now fully shared between app templates, unless
the template includes a custom userpref.blend. I think this will be
useful in general, not all app templates need their own keymaps for
example.
* Previously Save User Preferences would save the current app template
and then Blender would start using that template by default. I've
disabled this, to me it seems it was unintentional, or at least not
clear at all that saving user preferences also makes the current
Differential Revision: https://developer.blender.org/D3690
|
|
Drag and drop will follow later, it's a bit complicated to make this work
reliable in the current UI code.
|
|
In the workspace properties a mode can now be configured that is
automatically enabled when switching to the workspace.
This is a test to validate how well it works. The weak point is
that if you don't have an appropriate object already select it will
not switch modes.
See T56475.
|
|
These are not intended to be closed as often as e.g. browser tabs, they are
intended to be more persistent and accidental closing should be avoided.
|
|
This is quite confusing in the current UI, with both startup.blend and
workspaces.blend containing a list of workspaces. In practice you'd usually
want to save workspaces to both files.
The downside of having a single file may be that you then can't disable
certain workspaces by default, but we could add a setting for that.
|
|
We want these to have the same workspaces in both, so there is no reason
to have two files that are identical.
|
|
|
|
When switching the workspace in a window that does not yet have a layout
for the newly active workspace, we now duplicate the layout from the
previously active workspace. Previously it duplicated the layout from
the first window in the newly active workspace.
|
|
It was a bit odd that the scene was stored per window but not the view
layer. The reasoning was that you would use different view layers for
different tasks. This is still possible, but it's more predictable to
switch them both explicitly, and with child window support manually
syncing the view layers between multiple windows is no longer needed
as often.
|
|
* Main windows show a topbar and statusbar, and select a workspace and
scene. They are created with Window > New Main Window.
* Child windows do not show a topbar or statusbar. These follow the
workspace and scene of their parent main window. Created with Window >
New Window or View > Duplicate Area into New Window.
* The purpose of this change is to support multi monitor setups where you
just want to put more editors on the other monitors. Without multiple
topbars and statusbars, working within a single workspace and scene.
Creating multiple main windows is intended to be a concious choice to
do different tasks in different workspaces and scenes.
* Note these changes do not currently affect how the operating system
treats the windows.
* When changing the workspace, the layout in all child windows changes.
This makes sense if we consider child windows to be just a way to
extend the main window across more monitors. In some case it may be
useful to keep the same layout though, we can add an option for this
depending on user feedback.
|
|
|
|
Was just added to ease merging of master, proper code now!
|
|
Don't store pointers to ViewLayer in the workspace, only names. Add specific
relation type since the generic mechanism makes the code hard to follow.
Integrate with pointer restore for undo and library remapping code to avoid
data going out of sync.
Also add relation automatically if there doesn't exists one yet in
BKE_workspace_view_layer_get, because in general it's really hard to ensure
it will exist when making arbitrary scene changes.
Differential Revision: https://developer.blender.org/D3432
|
|
Many files using the window manager don't access the tool-system.
This avoids rebuilding many files when the tool-system changes.
|
|
|
|
This patch adds support for:
- Per space-type tools (3D view and edit).
- Per mode tools (object, edit, weight-paint .. etc).
The top-bar shows the last activated tools options, this is a design
issue with using a global topbar to show per-space settings.
See D3395
|
|
Linking/appending in edit mode currently isn't supported. For workspaces it
should probably be, but we can look into supporting this later.
For now gray out buttons in "Add Workspace" menu while in edit mode.
|
|
== 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
|
|
ViewRender was removed, which means we can't get the render engine for files
saved in 2.8. We assume that any files saved in 2.8 were intended to use Eevee
and set the engine to that.
A fix included with this is that .blend thumbails now draw with Clay mode,
and never Eevee or Cycles. These were drawn with solid mode in 2.7, and should
be very fast and not e.g. load heavy image textures.
Differential Revision: https://developer.blender.org/D3156
|
|
This was stored in the workspace, selected from the view.
Move both to scene since custom orientations are closely related to your
scene data.
|
|
Could use an operator-macro if they'd support own RNA-properties. For
now added a wrapper operator.
|
|
Caused by 1c24c04e6023f2d2a3.
|
|
This caused too many problems syncing object modes
with multiple objects/windows/workspaces, see: D3130 for details.
|
|
Steps to reproduce were:
* Append a workspace (via '+' icon) - make sure its from the default workspaces.blend
* Activate it
* Should crash
Was accessing data from view-layer which wasn't updated yet (and thus could be
NULL). Crash occured after rB8153f89518b4a.
@campbellbarton, you may want to check if all object-mode stuff still works as
expected, not sure what's the state of it.
|
|
Check if mode data exists before attempting to change the modes.
|
|
|
|
|
|
It was too tricky to know ahead of time if an object would still
be visible in the new window/workspace/scene/layer combination,
especially since other windows may share some of these data-blocks.
So store the context, make the change, then check if the object is
still visible, freeing mode data of it's not.
|
|
|
|
The same workspace can have different active objects depending on the
window. So check other windows.
|
|
|
|
Match 'workspace_change_update'.
|