Commit Graph

155 Commits

Author SHA1 Message Date
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
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
3ec7748485 Cleanup: spelling in comments (make check_spelling_*)
Also replace term "playhead" with "current-frame".
2025-05-15 10:13:23 +10: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
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
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
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
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
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
Campbell Barton
6dfe8e5eb8 cppcheck: update exclude path 2025-03-27 16:15:36 +11:00
Campbell Barton
33d16796a7 License headers: add header, update files to exclude 2025-03-20 00:39:00 +00:00
Campbell Barton
3438acc3c3 CMake: add missing headers to source lists 2025-03-06 11:08:18 +11:00
Campbell Barton
17f3dc3bde Tools: minor correction to check_licenses reporting
- Include missing licenses in the list of unknown licenses.
- Never show "100.00%" complete unless all licenses headers are correct.
2025-02-18 11:27:19 +11:00
Campbell Barton
c0b9814c07 Cleanup: quiet warnings & simplify Popen use in project_source_info 2025-02-11 13:42:09 +11:00
Campbell Barton
ad4eb66fdf Tools: add OUTPUT_DIR option to the "check_cppcheck" target
- Add optional `--build-dir` & `--output-dir` arguments to
  "static_check_cppcheck.py".
- Support using `project_source_info.py` without the CWD having
  to be the build-directory.
- Make the script executable.
2025-02-11 13:07:36 +11:00
Campbell Barton
8e122ccc72 Cleanup: correct spelling in comments (check_spelling_*) 2025-02-06 12:37:32 +11:00
Campbell Barton
9af355fcc1 check_spelling: correct help text formatting, correct "--check" text 2025-01-07 13:39:28 +11:00
Campbell Barton
444f1064c9 Cleanup: remove unused functions, imports 2025-01-04 21:09:41 +11:00
Campbell Barton
5fe261c89d Cleanup: declare __all__ for many scripts in tools/ 2025-01-04 20:27:58 +11:00
Campbell Barton
d2d754be3f Cleanup: spelling in comments (make check_spelling*)
- Back-tick quote math expressions so differentiate them
  from English.
- Use doxygen code blocks for TEX expressions.
2025-01-04 16:26:39 +11:00
Campbell Barton
0b0fddb614 Cleanup: use type hints for the QtCreator project generator
Also resolve some warnings for project_info.py.
2025-01-02 17:06:56 +11:00
Campbell Barton
7516614c2b Fix source checking tools using project_source_info
Moving files in [0] caused the module not to be found.

Also revert Python 3.6 compatibility changes.

[0] 2c9ab53273
2025-01-02 16:57:51 +11:00
Campbell Barton
030f367c33 Tools: remove project_netbeans
Remove the script that converted an eclipse project to netbeans,
it seems unlikely this was widely used since it wrote to an old/outdated
project file format.

Since this was written, most IDE's (including NetBeans) have improved
their CMake support.
2025-01-02 16:01:17 +11:00
Campbell Barton
dfef060ea4 Cleanup: spelling in comments (make check_spelling_*)
Also use doxy-code blocks for inlined TEX to avoid
them being interpreted as English.
2025-01-02 15:11:17 +11:00
Bastien Montagne
e83d87f588 Move several py scripts from build_files to tools.
Preliminary step towards adding 'system python' validation for some
build-essential py scripts (!130746).

Pull Request: https://projects.blender.org/blender/blender/pulls/132025
2024-12-17 19:02:45 +01:00
Aras Pranckevicius
aa88b996e4 Cleanup: remove old CPU compositor code
40 thousand lines of now-unused code, poof gone. Blender
executable (Windows, Release config) becomes 670 kilobyte smaller.

Pull Request: https://projects.blender.org/blender/blender/pulls/131819
2024-12-13 10:59:54 +01:00
Campbell Barton
a7bc3e3418 Cleanup: quiet Python linter warnings 2024-12-11 11:26:24 +11:00
Campbell Barton
a4f67e5958 Cleanup: revert channel-bag hyphenation & add to the dictionary
The combind terms are preferred by the animation team.
2024-12-09 23:44:23 +11:00
Campbell Barton
083b690fb5 Cleanup: spelling in comments 2024-12-09 09:14:44 +11:00
Campbell Barton
8701ccc6d8 mypy: update checker to support specific files overlapping directories
This allows single files to use different settings to other files
in the same directory. Add check_unused_defines.py.
2024-11-29 15:57:30 +11:00
Campbell Barton
273f48cd53 Cleanup: use main functions to allow importing scripts
Support importing scripts without running their logic to
allow basic validation (see #130746).

Parts of !131037 were used.

Co-authored-by: Bastien Montagne <bastien@blender.org>
2024-11-29 15:54:58 +11:00
Campbell Barton
0de8ae8046 Cleanup: spelling in comments 2024-11-25 13:24:46 +11:00
Campbell Barton
7b3e2fd7dd mypy: add 3 scripts to the "make check_mypy" config 2024-11-02 23:18:59 +11:00
Campbell Barton
cfc645901f Cleanup: use type hints for discover_nodes.py 2024-10-23 13:18:36 +11:00
Campbell Barton
a0453ab87a Cleanup: update use of typing in for Python scripts 2024-10-23 12:48:09 +11:00
Campbell Barton
11e41f7276 Merge branch 'blender-v4.3-release' 2024-10-15 16:22:09 +11:00
Campbell Barton
44d0452a78 Cleanup: spelling in comments 2024-10-15 12:51:05 +11:00
Campbell Barton
2e881eacd1 Cleanup: spelling in comments 2024-10-08 09:54:29 +11:00
Campbell Barton
c6fd26a3f5 Cleanup: spelling in comments 2024-10-01 09:59:33 +10:00
Campbell Barton
0e08e8bf2d Cleanup: add missing CMake headers, update "check_cmake" config 2024-09-25 19:24:21 +10:00
Campbell Barton
840c65f442 Cleanup: spelling in comments 2024-09-25 19:24:20 +10:00