Fix `blender_theme_as_c.py` for the rename of `ListBase::first` to
`first_`.
The script actively parses `dna_rename_defs.h` before accessing the
file's DNA, which means it needs updating after the rename.
Pull Request: https://projects.blender.org/blender/blender/pulls/163948
Notice while doing this that
"blender <blender@MacBook-Pro-von-Thomas.local>" from dab88d61eb is
apparently Thomas Dinges, so add this address to the list of canonical
authors.
Ref !160527
This commit improves author name collation the same way we did
previously for the credit generation script: by normalizing the
strings using the decomposed unicode variant, and by folding their
case so that non-title case names aren't at the end of the list.
Ref !160527
Co-author lines are parsed in commit messages to add to the credits.
When the line does not end with the author's email, it will create a
duplicated entry. This is easy to fix if the email is enclosed in <>,
just discard what follows the address.
Example of this in commit e10a50f890
Ref !160527
Credits are generated with a footer that reads
"Generated by 'credits_git_gen.py' 2026/6/22".
It is better to pad the month and day so that they appear as
"2026/06/02".
Ref !160527
Some author names are written in lower case, which by default places
them after title case ones.
This commit uses `str.casefold()` to ignore case during sorting.
Ref !160527
Some authors have names containing non-English letters. Using the
default sort, those names are written at the end of the list.
This commit uses `unicodedata.normalize('NFD', ...)` during sorting.
This outputs the decomposed unicode variant of a string, such that
diacritized letters are found after their undiacritized version
instead of at the very bottom.
This does not solve collation for names written in a non-latin
alphabet, which would probably require external libraries.
Ref !160527
Rename `scripts/modules/_bpy_internal/assets/remote_library_listing/`
to `.../remote_library/`. The Python module started out as code for
the remote listing, but now has all the asset-related code (so also
downloading the assets themselves).
No functional changes.
Pull Request: https://projects.blender.org/blender/blender/pulls/158651
Take the 'description' fields from the OpenAPI schema definition file,
and use those to generate docstrings for the dataclasses.
This adds another dependency to the generator's virtualenv:
docformatter. The generator already runs autopep8 via Blender's `make
format` command, but that doesn't rewrap long docstrings. That's what
docformatter now does.
No functional changes, just added developer comfort.
Pull Request: https://projects.blender.org/blender/blender/pulls/158598
Part of the remote asset libraries project, see:
https://projects.blender.org/blender/blender/issues/134495
No user visible changes expected.
This commit contains all the Python code necessary integration with
Blender's asset system (so for downloading asset listings, previews, and
the assets themselves), and for the `blender -c asset_listing` CLI
command.
The OpenAPI datamodel generator no longer includes the OpenAPI schema in
the generated code. That was intended to be used by a validation
library, but as it turns out, that couldn't handle the recursive
definitions we need. Now the code just relies on the validation from the
cattrs library, which is good enough for our purpose.
Available CLI commands:
blender -c asset_listing generate:
Generates the asset listing for all assets in the current directory &
subdirectories.
blender -c asset_listing download <URL>:
This is more of a test command, to download the asset listing. The URL
should point to the root of the asset library, so basically a
HTTP-exposed version of the same directory in which the `generate`
command above was given.
The files are downloaded to `./_asset_download_location`. That way the
current directory isn't spammed with multiple files.
Downloading includes a time-based 'stamp' for cache-busting, when
requesting the top-level JSON file of a remote asset library's listing.
This stamp is the number of seconds since some point in time, divided by
60, to make it change once per minute. This means that a caching service
like CloudFlare can cache the response, and only forward the query to
our HTTP server once every minute.
Co-authored-by: Julian Eisel <julian@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/153284
datamodel-code-generator version 0.42.1 fixed a bug[1] for which the
Remote Asset Libraries project had to implement a workaround. Version
0.53.0 introduces some backward-incompatible changes[2], and so it's
best to upgrade to that version before seriously using this generator.
[1]: https://github.com/koxudaxi/datamodel-code-generator/issues/836
[2]: https://github.com/koxudaxi/datamodel-code-generator/releases/tag/0.53.0
Before running `ninja generate-datamodels` (replace `ninja` with your
build tool of choice), make sure you delete the virtualenv
(`generate_datamodels_venv/` in your build directory). It will be
recreated with the new dependency version by the next run of `ninja
generate-datamodels`.
Pull Request: https://projects.blender.org/blender/blender/pulls/153427
Only sorting by the number of commits was unstable
when authors had the same number of commits.
Make the output stable by including the name in the sort "key".
Ref !149460
Authors in credits_git_gen.py includes email addresses if the
`--use-email` flag is passed which include characters that need
to be escaped.
Ref !149459
This uses the orgs section of AUTHORS to generate the corporate part of
the html credits.
This also simplifies and simply list the orgs without the specific
contribution. This reduces the maintaince burden of keeping this list
up-to-date (which was always very arbritrary.
---
Example, it goes from:
```
Adidas – Principled BSDF shader in Cycles
AMD – Cycles HIP GPU rendering, CPU optimizations, Hydra integration
Apple – Metal GPU backends, USD integration
AutoCRC – Improvements to fluid particles, vertex color baking
BioSkill GmbH – H3D compatibility for X3D Exporter, OBJ Nurbs Import/Export
Facebook – Cycles subsurface scattering improvements
Intel – Cycles oneAPI GPU rendering, CPU optimizations
NVIDIA – Cycles OptiX GPU rendering, USD integration
Sony Interactive Entertainment – Deployment improvements
Unity Technologies – FBX Exporter
```
To:
```
Adidas
AMD
Apple
AutoCRC
BioSkill GmbH
Facebook
Intel
NVIDIA
Sony Interactive Entertainment
Unity Technologies
```
It also adds more orgs which were listed on AUTHORS (Qualcomm, Blender Foundation, ...).
Pull Request: https://projects.blender.org/blender/blender/pulls/149424
Rename modules in `./scripts/modules/` to use an underscore prefix to
make it clear they aren't intended to be part of public API's. This
also means there is no implication that these modules should be stable,
allowing us to change them based on Blender's internal usage.
The following modules have been marked as private:
- `animsys_refactor`
- `bl_console_utils`
- `bl_i18n_utils`
- `bl_previews_utils`
- `bl_rna_utils`
- `bl_text_utils`
- `bl_ui_utils`
- `bpy_restrict_state`
- `console_python`
- `console_shell`
- `graphviz_export`
- `keyingsets_utils`
- `rna_info`
- `rna_manual_reference`
- `rna_xml`
Note that we could further re-arrange these modules
(under `_bpy_internal` in some cases), this change is mainly to mark
them as private, further changes can be handed on a case-by-case basis.
Ref !147773
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
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