Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-09-23LibLink: Modify WM API to link/append one ID to take flag parameter.Bastien Montagne
There is no reason to lock behavior into a specific configuration in those calls, make them properly configurable like the rest of the link/append code. This also enable users of those functions to activate 'ID reuse' behavior.
2021-02-20Cleanup: doxygen sectionsCampbell Barton
2020-10-27Cleanup: use over-line for doxy commentsCampbell Barton
Follow our code style for doxygen sections.
2020-10-17Cleanup: Reduce variable scope in screen directoryHans Goudey
Also return early and use LISTBASE_FOREACH in a few places
2020-10-02Fix (unreported) design flow in how workspace's relation data are read from ↵Bastien Montagne
.blend file. Relying on pointer addresses across different data-blocks is extremely not recommended (and should be strictly forbidden ideally), in particular in direct_link step of blend file reading. - It assumes a specific order in reading of data, which is not ensured in future, and is in any case a very bad, non explicit, hidden dependency on behaviors of other parts of the codebase. - It is intrinsically unsafe (as in, it makes writing bad code and making mistakes easy, see e.g. fix in rB84b3f6e049b35f9). - It makes advanced handling of data-blocks harder (thinking about partial undo code e.g., even though in this specific case it was not an issue as we do not re-read neither windowmanagers nor worspaces during undo). New code uses windows' `winid` instead as 'anchor' to find again proper workspace hook in windows at read time. As a bonus, it will also cleanup the list of relations from any invalid ones (afaict it was never done previously). Differential Revision: https://developer.blender.org/D9073
2020-08-21Cleanup: Use LISTBASE_FOREACH in editors/screen directoryHans Goudey
Differential Revision: https://developer.blender.org/D8653
2020-08-20Revert "Cleanup: Use LISTBASE_FOREACH in editors screen directory"Hans Goudey
This reverts commit 52f40bcff21b285b7eaa21aaa9c6c7b9d6fa8669. Apologies for the noise. I caught a problem with this that I hadn't before. I will commit later after thorough testing.
2020-08-20Cleanup: Use LISTBASE_FOREACH in editors screen directoryHans Goudey
Differential Revision: https://developer.blender.org/D8653
2020-08-04Fix T78688: Crash changing workspace with specific fullscreen setupJulian Eisel
When switching workspaces we need to have an unused screen layout that we can activate. The other window now showed the only available screen layout in fullscreen though. Usually when there's no unused screen layout we duplicate an existing one, but that code didn't respect the fullscreen case properly. This also tries to clean up the logic a bit, but things are still rather complicated to follow. Changes in this code are always risky. Of course things worked fine in my tests, but I wouldn't be surprised if something breaks.
2020-06-03Object: refactor mode switchingCampbell Barton
Functionality here has become confusing over time, this removes duplicate, similar functions, preferring to set the mode instead of toggle, enter, exit. Mode switching utility function behaved differently regarding undo, 'ED_object_mode_toggle' for example didn't skip the undo push where 'ED_object_mode_set' did. Some callers chose these functions based on the intended undo behavior, even when toggling didn't make sense. There was also ED_object_mode_generic_enter which was similar to ED_object_mode_set, instead of the reverse of ED_object_mode_generic_exit. Simplify object mode switching internals: - Replace ED_object_mode_generic_enter with ED_object_mode_set. - Remove ED_object_mode_toggle as nearly all callers needed to check the current mode so toggling would set the mode argument correctly. - Use ED_object_mode_set for the object mode switching operator to simplify logic. - Add ED_object_mode_set_ex which has an argument to disable undo, needed when loading undo data needs to set the mode. - Remove unused ED_object_mode_exit.
2020-05-26Cleanup/refactor: Workspace API, boilerplate code, early exitJulian Eisel
* Simplify workspace API a bit * Comment on behavior of workspace-layout relations where exposed in API * Remove annoying getters/setters * Avoid lookups if we can early exit * A NULL check is removed in `direct_link_workspace()` that I don't see a need for. Am not 100% sure though, fingers crossed. In general these changes should improve readability and make things easier to reason about.
2020-04-03Code Quality: Replace for loops with LISTBASE_FOREACHDalai Felinto
Note this only changes cases where the variable was declared inside the for loop. To handle it outside as well is a different challenge. Differential Revision: https://developer.blender.org/D7320
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-09Python API: allow overriding context.workspace for workspace operatorsKai Jægersen
Differential Revision: https://developer.blender.org/D6867
2020-03-06Cleanup: Reduce context usage in UI functionsJulian Eisel
Part of https://developer.blender.org/T74429. There's a chance that this causes some issues becaue in some cases we change from getting the window from context to getting it from somewhere else.
2020-02-10Cleanup/refactor: Rename `BKE_library` files to `BKE_lib`.Bastien Montagne
Note that `BKE_library.h`/`library.c` were renamed to `BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here. Part of T72604.
2019-09-21Cleanup: unused headers in editorsCampbell Barton
2019-07-03Fix T61808: remove confusing graying out of workspace that already existBrecht Van Lommel
This was meant to help users see which users are likely useful to add, but it's not so obvious and there are cases where it's useful to re-append the same workspace.
2019-07-03Fix T65899, T66314, T61808: various issues appending workspacesBrecht Van Lommel
This fixes crashes, wrong names and inability to append workspaces in edit mode. We now bypass the append operator so we can easily return a datablock pointer and work in any mode.
2019-06-27Tool System: don't unlink tools when changing workspacesCampbell Barton
Caused gizmos to be lost with multiple main windows whenever one of them switched workspaces. Rely on tool gizmos poll function to unlink to gizmo.
2019-06-13Fix T65445: wrong defaults when appending workspaces from builtin templatesBrecht Van Lommel
2019-06-02Fix T65082, T65084: duplicating workspace does not preserve mode and orderBrecht Van Lommel
2019-05-13Fix T64407: crash adding workspace after appending datablockBrecht Van Lommel
The files operator property should not be remembered for next operator executions, gives unexpected effects when using the operator again.
2019-05-04Fix T64045: Crash activating fullscreen workspaceJulian Eisel
See d83a72ec104ce9.
2019-04-21Cleanup: comments (long lines) in editorsCampbell Barton
2019-04-17ClangFormat: format '#if 0' code in source/Campbell Barton
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
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
2019-04-01Fix T63169: 'Duplicate Current' entry in new workspace menu is not translated.Bastien Montagne
2019-03-11Fix T60855: workspace duplicate does not preserve addons filters.Brecht Van Lommel
2019-03-09Fix active workspace changes when deleting workspaceDalai Felinto
Tested for multi-window as well, which failed with the previous code even before we introduced ordered workspaces.
2019-03-09Fix crash when deleting workspaces too fastDalai Felinto
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.
2019-03-08Cleanup: use plural names for Main listsCampbell Barton
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.
2019-02-27Cleanup: Main struct member namesCampbell Barton
Rename latt to lattice and don't use plural names.
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
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.
2019-01-26Cleanup: remove redundant BKE/BLI/BIF headersCampbell Barton
2019-01-15Cleanup: replace usages of deprecated BKE_libblock_free by BKE_id_free.Bastien Montagne
2018-11-28WM: remove tool initialization codeCampbell Barton
Area initialization handles these cases now.
2018-11-07Cleanup: remove some useless BKE_library and BKE_main includes.Bastien Montagne
Makes it simpler to make some changes... Also fix order of some includes (use alphabetical please).
2018-11-07UI: Use icons for some operators.Pablo Vazquez
* Area and Workspace duplicate. * Toggle Area Fullscreen * Operator Search * Workspace reorder to front/back (arrows help to know which direction means front/back)
2018-10-30Fix memory leak in workspace menuCampbell Barton
2018-09-18Application Templates: make templates more prominent in the UI.Brecht Van Lommel
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
2018-09-11Workspace: support reordering of workspaces from RMB menu.Brecht Van Lommel
Drag and drop will follow later, it's a bit complicated to make this work reliable in the current UI code.
2018-08-30Workspaces: switch object mode when switching workspaces.Brecht Van Lommel
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.
2018-08-23Workspaces: move delete to right click menu, instead of X on tab.Brecht Van Lommel
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.
2018-08-20Workspaces: remove separate workspaces.blend config file.Brecht Van Lommel
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.
2018-08-20Workspaces: replace bundled workspace.blend with embedded startup.blend.Brecht Van Lommel
We want these to have the same workspaces in both, so there is no reason to have two files that are identical.
2018-08-20Fix system workspaces.blend not being found on some systems.Brecht Van Lommel
2018-07-04Workspaces: change behavior when window layout for workspace is missing.Brecht Van Lommel
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.