This is a personal collection of simple CLI utilities that I made to help my development of Blender addons.
Project description
BPY Dev Utilities
This is a personal collection of simple CLI utilities that I made to help my development of Blender addons.
Installation
pip install bpy-dev-utils
OR
poetry add bpy-dev-utils
Install Tool
bpy install <src-dir> <blender-addons-dir>
Installs addons directly from their source files into the specified Blender addons installation directory.
Arguments:
- src-dir: Directory where addon sources are located. eg
MyProject\src
- blender-addons-dir: Blender addon installation directory. eg
\Blender\3.2\scripts\addons
Options:
- --excluded-addons: Addon names to be excluded from installation. eg
["Addon1", "Addon2"]
- --remove-suffixes: File types to be deleted before installation. eg
[".pyc", ".txt"]
- --blender-exe: Path to blender exe. eg
\Blender\blender.exe
- --reload-blender: Load blender and enable addons, requires --blender-exe to be set. eg
True
- --help: Show help.
Symlink Tool
bpy symlink <src-dir> <blender-addons-dir>
Creates symlinks to the addon source in the specified Blender addons installation directory. Requires either symlink creation privileges, either through running as admin or security policy.
Arguments:
- src-dir: Directory where addon sources are located. eg
MyProject\src
- blender-addons-dir: Blender addon installation directory. eg
\Blender\3.2\scripts\addons
Options:
- --excluded-addons: Addon names to be excluded from symlink creation. eg
["Addon1", "Addon2"]
- --remove-suffixes: File types to be deleted before symlink creation. eg
[".pyc", ".txt"]
- --blender-exe: Path to blender exe. eg
\Blender\blender.exe
- --reload-blender: Load blender and enable addons, requires --blender-exe to be set. eg
True
- --help: Show help.
Packing Tool
bpy pack <src-dir> <release-dir>
Packs addons into ZIP files and automatically names them based on data extracted from the addon bl_info dictionary.
Example resulting name: My Addon (v1.0.0).zip
Arguments:
- src-dir: Directory where addon sources are located. eg
MyProject\src
- output-dir: Directory where the archive should be built. eg
MyProject\releases
Options:
- --excluded-addons: Addon names to be excluded from packing. eg
Addon1, Addon2
- --remove-suffixes: File types to be deleted before packing. eg
.pyc, .txt
- --help: Show help.
Config File
All arguments and options can be specified in a pyproject.toml
file, the script looks for this file in the current working directory.
[tool.bpydevutil]
blender-addons-dir = "Blender\\3.2\\scripts\\addons"
src-dir = "blender-addons\\my-addon\\src"
output-dir = "blender-addons\\my-addon\\output"
remove-suffixes = [".pyc", ".txt"]
blender-exe = "Blender\\blender.exe"
reload-blender = true
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for bpy_dev_utils-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c20c9439508d50defc3eec7813002bef97c3512e977ee2c76daeda1e056d0bab |
|
MD5 | f064aa894dccd94a10d7b37a27ae968b |
|
BLAKE2b-256 | 79ed99823f31c280189705fe01f684b0e7fb15a4f923f807e517a265bd9467e4 |