The official Blender project repository.
Sybren A. Stüvel
3ef748789d
Two commits that basically do the same thing for two `enum`s: give them a name. - the `IDWALK_…` enum → `LibraryForeachIDFlag`. - the `IDWALK_CB_…` enum → `LibraryForeachIDCallbackFlag`. This way the flags are type-safe, and it's known where values come from. This is much preferred (at least by me) to just having `int flags`. Uses of `0` have been replaced with `IDWALK_NOP` and `IDWALK_CB_NOP`, as those have the same value and are of the right type. One invalid use of `IDWALK_NOP` was detected by this change, and is replaced by `IDWALK_CB_NOP`. And another one in the opposite direction. This change might be incomplete; I gave the enum a name, fixed the compiler errors, and then also updated assignments like `int cb_flag = cb_data->cb_flag`. I might have missed some assignments to `int` though. No functional changes. ---------- I intend to land this PR as its two separate commits. I just put them in the same PR so the buildbot can handle them in one go, and we don't have a stack of highly relatled PRs. In the future this could also apply to the `IDWALK_RET_…` enum. This one I left out, though, because a proper cleanup there would also have to include their ambiguity on whether they are bitflags (like the enums in this PR) or not. Their values and the code in `BKE_lib_query_foreachid_process()` implies they are bitflags, but in practice they are never or'ed together and just used as discrete values. Pull Request: #131803 |
||
---|---|---|
.gitea | ||
.github | ||
build_files | ||
doc | ||
extern | ||
intern | ||
lib | ||
locale | ||
release | ||
scripts | ||
source | ||
tests | ||
tools | ||
.clang-format | ||
.clang-tidy | ||
.editorconfig | ||
.git-blame-ignore-revs | ||
.gitignore | ||
.gitmodules | ||
AUTHORS | ||
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.