Commit Graph

100 Commits

Author SHA1 Message Date
Damien Picard
5998795aa6 UI: Replace contractions with long-form text
Avoid using contractions for can't, aren't, doesn't, and shouldn't.
Following the writing style guide in the Human Interface Guidelines.

Pull Request: https://projects.blender.org/blender/blender/pulls/143852
2025-08-05 11:16:22 +02:00
Sybren A. Stüvel
3ca28acbb3 Introduce Python code generator for OpenAPI spec to dataclasses
Add a [Python code generator][1] that takes an OpenAPI definition and
outputs the corresponding data model as [dataclasses][2]

This is intended to be used in the Remote Asset Library project, to
create, download, parse, and validate information of a remote asset
library.

[1]: https://koxudaxi.github.io/datamodel-code-generator/
[2]: https://docs.python.org/3/library/dataclasses.html

## Running the Generator

The generator is a Python script, which creates its own Python
virtualenv, installs the dependencies it needs, and then runs the
generator within that virtualenv.

The script is intended to run via the `generate_datamodels` CMake
target. For example, `ninja generate_datamodels` in the build
directory.

## Details

The virtualenv is created in Blender's build directory, and is not
cleaned up after running. This means that subsequent runs will just
use it directly, instead of reinstalling dependencies on every run.

## Generated Code & Interaction with Build System

It is my intention that the code generation _only_ happens when the
OpenAPI specification changes. This means that the generated code will
be committed to Git like any hand-written code. Building Blender will
therefore _not_ require the code generator to run. Only people working
on the area that uses the generated code will have to deal with this.

Pull Request: https://projects.blender.org/blender/blender/pulls/139495
2025-08-01 16:33:56 +02:00
Campbell Barton
e5947bdf63 Cleanup: spelling (make check_spelling_*)
Also exclude some files that have too many false positives.
2025-07-20 14:59:19 +10:00
Campbell Barton
bc0ab8c6d9 Merge branch 'blender-v4.5-release' 2025-07-10 12:51:37 +10:00
Campbell Barton
9d7e4890c8 Merge branch 'blender-v4.5-release' 2025-07-10 12:51:32 +10:00
Campbell Barton
2f2331d067 Tools: warn about duplicate authors in the author list generator 2025-07-10 12:49:08 +10:00
Campbell Barton
f72f5a2297 AUTHORS: de-duplicate 2025-07-10 12:48:33 +10:00
Campbell Barton
0a2d3d9d85 Merge branch 'blender-v4.5-release' 2025-07-09 11:23:56 +10:00
Campbell Barton
85ad73809f AUTHORS: add 45 new authors 2025-07-09 01:22:00 +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
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
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
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
4237e6134c Docs: note what git_data_canonical_authors.py is used for. 2025-04-24 01:30:11 +00:00
Campbell Barton
9567ac1272 Cleanup: quiet python linter warnings 2025-04-16 11:08:40 +10:00
Campbell Barton
a65569f367 Merge branch 'blender-v4.4-release' 2025-03-12 21:55:59 +11:00
Campbell Barton
6702645e8d AUTHORS: add 37 new authors 2025-03-12 21:52:39 +11:00
Thomas Dinges
820d550170 Utils: Update git author map 2025-03-11 17:58:33 +01:00
Campbell Barton
e2fc2d96f8 Cleanup: wrap Python lines exceeding 120 2025-02-13 10:01:03 +11:00
Campbell Barton
abd933d6b0 Cleanup: prefer parenthesis over line continuations in Python scripts 2025-01-21 23:30:55 +11:00
Brecht Van Lommel
2cc72f5fb0 Tools: Update company credits 2025-01-14 21:26:48 +01:00
Campbell Barton
9d0aabe64a Tools: add "--skip-last" argument to addr2line_backtrace for convenience
The last address in a backtrace often reference symbols before main()
which aren't found, making the command take much longer to run.
2025-01-09 12:32:08 +11:00
Campbell Barton
61a2f7a431 Cleanup: resolve check_spelling & check_licenses warnings 2025-01-08 11:31:43 +11:00
Campbell Barton
ebf41cf047 Cleanup: quiet mypy warnings 2025-01-06 16:58:56 +11:00
Campbell Barton
4425acf946 Cleanup: suppress pylint/ruff warnings in Python scripts 2025-01-06 12:57:09 +11:00
Campbell Barton
c5203ef7fd Cleanup: use context-manager for opening files 2025-01-04 22:26:18 +11:00
Campbell Barton
5f640457d8 Cleanup: suppress various pylint warnings 2025-01-04 21:17:29 +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
a7bc3e3418 Cleanup: quiet Python linter warnings 2024-12-11 11:26:24 +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
0c8177f710 Merge branch 'blender-v4.3-release' 2024-10-29 14:45:57 +11:00
Campbell Barton
731712e3a7 AUTHORS: add 1 new author (via override) 2024-10-29 14:43:10 +11:00
Campbell Barton
c72076aec8 Merge branch 'blender-v4.3-release' 2024-10-28 09:52:18 +11:00
Campbell Barton
a312bfe6d5 Fix use of undefined variable in blend2json utility 2024-10-28 09:50:57 +11:00
Campbell Barton
901da07c59 Merge branch 'blender-v4.3-release' 2024-10-27 23:26:26 +11:00
Campbell Barton
4ac25883a3 Update blender_theme_as_c to match renamed define 2024-10-27 23:22:13 +11:00
Campbell Barton
5955e0566c Cleanup: update use of typing for tools/utils 2024-10-22 16:44:21 +11:00
Campbell Barton
2cfc1112d8 AUTHORS: add 1 new author & some updated names 2024-10-17 11:53:51 +11:00
Campbell Barton
46864bc2f4 AUTHORS: add 1 new author & some updated names 2024-10-17 09:48:39 +11:00
Campbell Barton
5fa0e1fc8d AUTHORS: add 29 new authors 2024-10-03 15:56:48 +10:00
Campbell Barton
a7ab81d927 PyAPI: remove use of BaseException
BaseException was used as a catch-all in situations where it
didn't make sense and where "Exception" is more appropriate
based on Python's documentation & error checking tools,
`pylint` warns `broad-exception-caught` for e.g.

BaseException includes SystemExit, KeyboardInterrupt & GeneratorExit,
so unless the intention is to catch calls to `sys.exit(..)`,
breaking a out of a loop using Ctrl-C or generator-exit,
then it shouldn't be used.

Even then, it's preferable to catch those exceptions explicitly.
2024-10-01 13:18:46 +10:00
Campbell Barton
386d6f098a AUTHORS: correct invalid de-duplication 2024-07-08 18:20:53 +10:00
Campbell Barton
46743e8e3f AUTHORS: add 2 new authors, 3 updated names 2024-07-05 21:04:39 +10:00
Brecht Van Lommel
4e4d8476c4 Tools: Remove cycles commit syncs script, moved to the standalone repo
Pull Request: https://projects.blender.org/blender/blender/pulls/123788
2024-06-26 21:30:00 +02:00
Campbell Barton
dc4c440f9f AUTHORS: add 32 new authors 2024-06-18 12:09:43 +10:00
Campbell Barton
e5fb4ad03b Cleanup: replace %-formatting with str.format in tools/ & release/ 2024-04-27 16:06:53 +10:00
Campbell Barton
06adfcaf38 Cleanup: unused imports 2024-04-19 16:09:30 +10:00
Campbell Barton
cf1849aedb Fix string formatting in git_log_review_commits_advanced dev tool 2024-04-02 10:17:54 +11:00