Commit Graph

625 Commits

Author SHA1 Message Date
Sybren A. Stüvel
90c05aa2d0 Tools: add option to weekly log generator to only show a single day
Add a new CLI option `--date YYYY-MM-DD` to the weekly log generator. Using
it will make it ignore the `--weeks-ago` parameter, and just show the
activity for that specific day.

This is just something I personally found useful, to occasionally inspect
a specific date (WBSO daily log).

Pull Request: https://projects.blender.org/blender/blender/pulls/141281
2025-07-03 10:38:13 +02:00
Campbell Barton
0d3826b354 Cleanup: make the blend file header private
This was split out as part of a refactor but isn't intended to be a
new public module for other scripts to use.

Ref !141088
2025-06-28 08:40:31 +10:00
Jacques Lucke
f0c7e52ff2 Core: extract blendfile_header.py as common utility for parsing .blend files
This new file can parse the file header (first few bytes) as well as the block
headers.

Right now, this is used by two places:
* `blendfile.py` which is used by `blend2json.py`
* `blend_render_info.py`

This new module is shipped with Blender because it's needed for
`blend_render_info.py` which is shipped with Blender too. This makes using it in
`blendfile.py` (which is not shipped with Blender) a bit more annoying. However,
this is already not ideal, because e.g. `blend2json` also has to add to
`sys.path` already to be able to import `blendfile.py`.

This new file could also be used by blender-asset-tracer (BAT).

The new `BlendFileHeader` and `BlockHeader` types may be subclassed by code
using it, because it wants to store additional derived data (`blendfile.py` and
BAT need this).

New tests have been added that check that the file and block header is parsed
correctly for different kinds of .blend files.

Pull Request: https://projects.blender.org/blender/blender/pulls/140341
2025-06-23 12:53:55 +02:00
Campbell Barton
776dbe942c Cleanup: spelling (make check_spelling_*) 2025-06-22 11:34:32 +00:00
Campbell Barton
37fe1b9b8d Merge branch 'blender-v4.5-release' 2025-06-19 10:34:11 +10:00
Campbell Barton
41bf2f598f Cleanup: spelling in comments (make check_spelling_*) 2025-06-19 00:10:18 +00:00
Clément Foucault
4fe75da973 EEVEE: Remove all remaining reference of EEVEE next
This changes the engine identifier back to `BLENDER_EEVEE`.

We keep the `BLENDER_EEVEE_NEXT` identifier around for
versioning reasons (have to detect when it is the active
engine of a older file).

This also rename a bunch of pannels that were using `next`
in their name.

This is a breaking change for Addons compatibility.

Pull Request: https://projects.blender.org/blender/blender/pulls/140282
2025-06-13 12:36:14 +02:00
Campbell Barton
63600f806b Cleanup: spelling in comments (make check_spelling_*) 2025-06-13 11:23:28 +10:00
Bastien Montagne
18635b604c Fix missing update for blender_theme_as_c script after BE removal.
Follow-up to blender/blender@bc80ef136e.
2025-06-12 15:09:23 +02:00
Jacques Lucke
d83bfee347 Core: support LargeBHead8 in blendfile.py
This indirectly also fixes `blend2json.py` because it's build on top of
`blendfile.py`.

Main changes:
* Update .blend file header parsing to support the different header types.
* Support unpacking `LargeBHead8`.
* Use `namedtuple` instead of index access when accessing block header because
  the order of items is different now.
* Update comments that were either fully redundant or already outdated.

Pull Request: https://projects.blender.org/blender/blender/pulls/140195
2025-06-11 14:30:37 +02:00
Aras Pranckevicius
5ad6d42c83 IO: Remove Collada import/export
Removes Collada import/export (has been deprecated since 4.2).

Pull Request: https://projects.blender.org/blender/blender/pulls/139337
2025-06-06 08:38:57 +02:00
Campbell Barton
bd0855f443 Docs: update code layout diagram 2025-05-30 12:33:04 +10:00
Campbell Barton
50f3240abd Cleanup: spelling & duplicate terms (check_spelling.py) 2025-05-30 11:03:56 +10:00
Hans Goudey
91803e130f Cleanup: Grammar: Fix uses of "for e.g."
e.g. stands for "exempli gratia" in Latin which means "for example".
The best way to make sure it makes sense when writing is to just expand
it to "for example". In these cases where the text was "for e.g.", that
leaves us with "for for example" which makes no sense. This commit fixes
all 110 cases, mostly just just replacing the words with "for example",
but also restructuring the text a bit more in a few cases, mostly by
moving "e.g." to the beginning of a list in parentheses.

Pull Request: https://projects.blender.org/blender/blender/pulls/139596
2025-05-29 21:21:18 +02:00
Julian Eisel
7417a07adb Fix: Weekly report script error when no PR found for branch
Not all branches have a PR and code generally handled that case fine,
just this assert didn't treat it as a valid result.
2025-05-27 15:59:37 +02:00
Campbell Barton
0265b13399 Tools: add a utility to validate array sizes
The script check_source/static_check_size_comments.py run directly
or called via the convenience target "make check_size_comments".

Add a utility module: `line_number_utils` which implements
a version of `re.finditer` that includes line numbers & ranges.
2025-05-23 14:04:26 +10:00
Campbell Barton
72f24fcbab Cleanup: resolve pylint warnings 2025-05-23 14:03:20 +10:00
Julian Eisel
ca4b485413 Tools: Adress mypy errors in recent weekly report script additions
5a5e1b7d14 added caused some errors when running `make check_mypy`, see
https://projects.blender.org/blender/blender/pulls/138615#issuecomment-1581404.
2025-05-22 12:37:29 +02:00
Campbell Barton
e5deeafe92 Cleanup: spelling in comments (make check_spelling_*) 2025-05-22 11:11:48 +10:00
Julian Eisel
5a5e1b7d14 Tools: Group commits in weekly report scripts
Since ec141ba3ff, commits from all branches are listed. Issue is that
commits from different repositories and branches will be mixed.
Personally I prefer grouping commits better, so I always edit the output
manually.

With this, commits will be grouped by branch, or PR if one can be found.
The branches and commits will then be printed under their target
repository. This isn't the owning repository of the branch or PR (often
people's personal fork), but the one it targets. This worked much better
in own tests.

Further:
- For some common repositories more readable names are used, e.g.
  "Blender Manual" instead of "blender/blender-manual".
- Commits of the Blender repository are listed first, without grouping
  under a `blender/blender`.
- Commits to each repository's main branch are listed first, directly
  under the repository grouping.
- See PR for a textual mockup of the output format.

Pull Request: https://projects.blender.org/blender/blender/pulls/138615
2025-05-20 19:13:43 +02:00
Julian Eisel
ec141ba3ff Tools: Include commits to all branches in weekly report script
Currently the script only includes commits to "main" branches. Much of
people's work is done in branches however, so developers either
customized the script, or they would manually go through own history to
find remaining commits (I asked some).

Even if some people prefer to only list main branch commits, it's much
easier to simply remove some commits than to add missing ones.

To be able to tell which branch a commit was on, this adds a " on
`branch-name`" after the commit hash. Personally I don't find this
optimal, I'd rather group commits under their repository/branch,
proposed separately in #138615.

Pull Request: https://projects.blender.org/blender/blender/pulls/138612
2025-05-20 19:07:18 +02:00
Campbell Barton
3ec7748485 Cleanup: spelling in comments (make check_spelling_*)
Also replace term "playhead" with "current-frame".
2025-05-15 10:13:23 +10:00
Aras Pranckevicius
919d2693c0 Build: expand Visual Studio natvis file
Expand the natvis file (which VS IDE debugger uses to visualize custom
data types) to handle:
- blender::Map with pointer keys
- blender::Set with both regular and pointer keys

Pull Request: https://projects.blender.org/blender/blender/pulls/138866
2025-05-14 14:45:40 +02:00
Clément Foucault
617858e453 GPU: Unified DataFormat enum
This unifies vertex and texture data formats
into a single base enum class.

`TextureFormat` and `VertexFormat` then mask
the invalid format for their respective usage.

Having a base enum allows casting between
`TextureFormat` and `VertexFormat` possible
(needed for Buffer Textures).

It also makes it easier to write and read data
to buffers/textures as each format will have an
associated host type.

These enum is generated from MACRO expansion.
This allow to centralize all information about
the formats in one place. This avoid duplicating
the list of enums for each backend.

This only creates the new enum. Porting older enums will
be done in other PRs.

Normalized integer CPU format are missing and waiting for #130640

Rel #130632

Pull Request: https://projects.blender.org/blender/blender/pulls/138069
2025-05-13 17:08:32 +02:00
Campbell Barton
5e75a9c1e8 Cleanup: spelling in comments 2025-05-11 17:00:47 +10:00
Julian Eisel
9128348e48 Fix: Tools: Commit hashes not shortened in weekly report script
Broken since 53d076612a.
2025-05-08 17:28:29 +02:00
Campbell Barton
16c87b62e4 UI: include rip in the UV menu
The shortcut for this operator wasn't discoverable.
Show this in the menu as done with with edit-mesh rip.
2025-05-07 15:49:21 +10:00
Campbell Barton
accc3de59e Cleanup: resolve mypy warnings
Also include bug_fixes_per_major_release.py in the "make check_mypy"
target.
2025-05-07 15:39:06 +10:00
Sergey Sharybin
0b59d9f00d Fix: make format to expand tabs
There is similar issue as what was fixed in autopep8 with the initial
LFS migration: `git ls-tree` running to gather all files contains files
with non-ascii names, such as some non-latin utf-8 files in the tests.

Decode the ls-tree using utf-8 for C code format as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/138488
2025-05-06 12:39:20 +02:00
Campbell Barton
fd6ac498b0 Cleanup: spelling in comments, strings (make check_spelling_*)
Also replace some triple-quoted non-doc-string strings with commented
blocks in examples.
2025-05-06 00:18:39 +00:00
Sergey Sharybin
bbfc97ad6f Move tests/data and assets to the main repository
This change moves the tests data files and publish folder of assets
repository to the main blender.git repository as LFS files.

The goal of this change is to eliminate toil of modifying tests,
cherry-picking changes to LFS branches, adding tests as part of a
PR which brings new features or fixes.

More detailed explanation and conversation can be found in the
design task.

Ref #137215

Pull Request: https://projects.blender.org/blender/blender/pulls/137219
2025-05-05 15:10:22 +02:00
Campbell Barton
a03db5307b check_spelling: enable checking text in single quotes for C/C++
Now only text enclosed in back-ticks is skipped.
2025-04-26 11:17:14 +00:00
Campbell Barton
c90e8bae0b Cleanup: spelling in comments & replace some use of single quotes
Previously spell checker ignored text in single quotes however this
meant incorrect spelling was ignored in text where it shouldn't have
been.

In cases single quotes were used for literal strings
(such as variables, code & compiler flags),
replace these with back-ticks.

In cases they were used for UI labels,
replace these with double quotes.

In cases they were used to reference symbols,
replace them with doxygens symbol link syntax (leading hash).

Apply some spelling corrections & tweaks (for check_spelling_* targets).
2025-04-26 11:17:13 +00:00
Campbell Barton
189a823d7b check_spelling: use language & token-type specific suppression
When skipping terms, support combinations of language & token types
ignoring different expressions.

This means Python can exclude double back-ticks for doc-strings
and doxygen expressions only need to be detected for C-family languages.
2025-04-26 00:55:51 +00:00
Campbell Barton
682e5e3597 Cleanup: spelling in comments (make check_spelling_*) 2025-04-26 00:48:04 +00:00
Campbell Barton
2d4290f285 Cleanup: spelling in comments (make check_spelling_*)
Also inconsistent capitalization.
2025-04-24 22:45:22 +00:00
Campbell Barton
500509a789 check_spelling: allow variables with an 'th suffix (for indices) 2025-04-25 08:37:11 +10:00
Campbell Barton
4237e6134c Docs: note what git_data_canonical_authors.py is used for. 2025-04-24 01:30:11 +00:00
Thomas Dinges
453d20aeeb Cleanup: Whitespace in issues script 2025-04-23 11:18:14 +02:00
Campbell Barton
9567ac1272 Cleanup: quiet python linter warnings 2025-04-16 11:08:40 +10:00
Campbell Barton
f54dcb2c6c Tools: use arguments for suppressions where possible
These were generated then filtered out, in most cases these can
be suppressed via arguments.
2025-04-15 12:08:08 +10:00
Campbell Barton
ac402bf7af Tools: include STRNLEN macros in code_clean utility 2025-04-12 13:39:11 +10:00
Campbell Barton
8e5c0aedec Cleanup: use type hints for trailing_space_clean.py utility 2025-04-05 20:06:34 +11:00
Campbell Barton
4139d4a8f0 Cleanup: spelling in comments (make check_spelling_*) 2025-04-04 12:48:04 +11:00
Campbell Barton
62ab0837b3 Cleanup: exclude code_layout_diagram.py from mypy check
Also update bl_run_operators.py based as #136156 is fixed.
2025-04-03 13:51:52 +11:00
Thomas Dinges
80db24671b Tools: Update platforms module ID in issues script 2025-04-01 10:36:50 +02:00
Campbell Barton
00deec7c66 Cleanup: spelling in comments 2025-04-01 12:37:36 +11:00
Campbell Barton
0bcafe14f1 Cleanup: resolve/suppress pylint warnings 2025-03-29 11:51:04 +11:00
Campbell Barton
1e27e02325 License header: add missing SPDX header 2025-03-27 16:16:53 +11:00
Campbell Barton
6dfe8e5eb8 cppcheck: update exclude path 2025-03-27 16:15:36 +11:00