fa0f295b53
Introduces *ARegionType.poll()* as a way to dynamically add/remove a region. The region is still there internally, but is not accessible to the user. Previously editors would to this manually, by either removing/adding regions altogether, or hiding them, unsetting their alignment (so no AZones are added I assume) and removing their event handlers. Polling makes this much simpler. We plan to use this in #102879. This patch refactors multiple editors to use region polling: - File Browser - Sequencer - Clip Editor - Preferences Notes: - Previously, editors would lazy-create some of the regions. Versioning is added here to ensure they are always there. Could be a separate patch. - Some editors reuse a region in different display modes, and so additional work needs to be done to reinit regions they become available or the mode changes. Typically `V2D_IS_INIT` is unset for that, which isn't great. Could be improved, but not a new issue. Behavior change: - When the Preferences are opened as a regular editor, the "execution" region in the preferences that displays the *Save Preferences* button would still be there, but empty with a scrollbar. This patch makes it disappear entirely. ## Implementation - Introduces `ARegionType.poll()` - Before a window is drawn, all contained regions have their poll checked, and the result is stored in a flag (`RGN_FLAG_POLL_FAILED` - runtime-only flag). - If the result of the poll changes, the area is re-initialized and event handlers are added/removed. - UI code checks the flag as needed. Pull Request: https://projects.blender.org/blender/blender/pulls/105088 |
||
---|---|---|
.gitea | ||
.github | ||
build_files | ||
doc | ||
extern | ||
intern | ||
locale | ||
release | ||
scripts | ||
source | ||
tests | ||
tools | ||
.clang-format | ||
.clang-tidy | ||
.editorconfig | ||
.git-blame-ignore-revs | ||
.gitignore | ||
CMakeLists.txt | ||
COPYING | ||
GNUmakefile | ||
make.bat | ||
pyproject.toml | ||
README.md |
Blender
Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.
Project Pages
Development
License
Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.
See blender.org/about/license for details.