Skip to main content

Build Blender extensions.

Project description

blender-extension-builder

A builder for blender extensions.

Blender allows you to add dependencies via packaging wheels with the extension, however you have to manually grab the wheels and put the filenames in the blender_manifest.toml file. This can be cumbersome, especially with many dependencies, and dependencies of dependencies that you don't control. This project aims to aid in that, and make it all a lot easier.

Installation

Install via pip

pip install blender-extension-builder

You also need Blender available on the PATH in order to build the extension.

Usage

You can use the command

build-blender-extension -h

Or

python -m build_blender_extension -h

Setting up blender_manifest.toml

Since this aims to make managing dependencies easier, there are a couple things added to the blender_manifest.toml file. The file will be structured like any blender_manifest.toml file, just with a few new options.

schema_version = "1.0.0"
id = "my_example_extension"
version = "1.0.0"
name = "My Example Extension"
tagline = "This is another extension"
maintainer = "Developer name <email@address.com>"
type = "add-on"
blender_version_min = "4.2.0"
license = [
  "SPDX:GPL-3.0-or-later",
]

# Place dependencies here. They can be in any format that pip supports.
dependencies = [
    'numpy'
]
# Folder to store the wheels in the addon.
wheel-path = './wheels'

# If you would like to manually specify the wheels, you still can.
# This If you also specify dependencies, those will be appended into this.
wheels = [
  './wheels/pillow-10.3.0-cp311-cp311-win_amd64.whl',
]

# Use this if blender is skipping a wheel for python version
# incompatibility (even though it's compatible)
# This can also be enabled in the commandline with `--ensure-cp311` or `-cp311`
ensure-cp311 = true

[build]
# Some optional extra options were added to this table

# Folder containing the source code of the extension. Defaults to the current directory
source = './src'
# Folder for where the extension will be stored
# with all the files (to build the extension). Defaults to ./build
build = './build'
# Output folder for the built addon in the .zip file.
dist = './dist'

# This contains a list of files or folders to keep in the built extension.
paths_include = [
  'LICENSE',
  'README.md',
]

All you have to do is now run

build-blender-extension -m blender_manifest.toml

Note: if you don't specify any arguments, it will try to use blender_manifest.toml.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

blender_extension_builder-1.3.0.tar.gz (42.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

blender_extension_builder-1.3.0-py3-none-any.whl (30.3 kB view details)

Uploaded Python 3

File details

Details for the file blender_extension_builder-1.3.0.tar.gz.

File metadata

File hashes

Hashes for blender_extension_builder-1.3.0.tar.gz
Algorithm Hash digest
SHA256 223ad490102416065b634aa0f18a1260b8ee69b3a8f0ef5e0b8a0a08aff7d7b4
MD5 9affaf74bf7de18468d1250c3a3dd9d5
BLAKE2b-256 dde780a34d70d12944ae0d7ea0cbab92c5b0a6d9d61b23308cc8a78edb70ec02

See more details on using hashes here.

Provenance

The following attestation bundles were made for blender_extension_builder-1.3.0.tar.gz:

Publisher: python-publish.yml on ego-lay-atman-bay/blender-extension-builder

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file blender_extension_builder-1.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for blender_extension_builder-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dd331780d58b65e297ef78c805470daae8e0bb720ca8793b6be3c2b7080f9e2b
MD5 47babaa8457dd370a1bc60b68893d8d4
BLAKE2b-256 3f8c6340f704a1ff7a0f6042502d05298bf49aeb7a7516f42988e0c92d92ec37

See more details on using hashes here.

Provenance

The following attestation bundles were made for blender_extension_builder-1.3.0-py3-none-any.whl:

Publisher: python-publish.yml on ego-lay-atman-bay/blender-extension-builder

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page