Files
test/tools
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
..

Blender Dev Tools
#################

This repository is intended for miscellaneous tools, utilities, configurations and
anything that helps with Blender development, but aren't directly related to building Blender.

Some of the tools included may be used stand-alone, others expect Blenders source code to be available.


Usage
=====

While this is a stand-alone repository,
some of the scripts which access Blenders source code assume this repository will be located at
``tools`` within Blenders source code repository. At some point this may be included as a submodule.

Some tools also rely on the ``blender`` binary, this is assumed to be located at: ``../../blender.bin``.
*The root directory of Blender's git repository*


Categories
==========

Check Source
------------

Any tools for scanning source files to report issues with code, style, conventions, deprecated features etc.


Config
------

Configuration for 3rd party applications (IDE's, code-analysis, debugging tools... etc).


Git
---

Scripts and utilities for working with git.


Utils
-----

Programs (scripts) to help with development
(currently for converting formats, creating mouse cursor, updating themes).