Instructions for setting up the dev environment
- VS Code
- Blender
If you are not using Docker
- Python 3.101
- Python extension for VS Code (
ms-python.python
)1 - Pylance extension for VS Code (
ms-python.vscode-pylance
)1
If you are using docker
-
Clone the repo
git clone --recursive https://github.com/bombsquad02420/blender-addon.git cd blender-addon
-
Install modules for development1
pip install -r requirements.txt
-
Install additional modules (for Blender to use)1
pip install --target=modules -r requirements.blender.txt
-
Add the repo's root folder (from STEP 1) to Blender's
script
data path.Edit
>Preferences
>File Path
-
Search for
debugger
inAdd-ons
panel and enable theDebugger for VS Code
extension. Under the extension's preferences the path (from STEP 3) todebugpy
should be auto-detected. -
Make sure the port is
5678
and timeout is set to a large enough value. -
Search for debugger and start the debugger
-
Open repo in VS Code
-
Open in Container2
Make sure the docker daemon is running and has proper priviledges (user must be added to the docker group. sudo must not be used)
Click
Open in Container
in notification promptOr use the Command Palette
-
In VSCode's Debug Panel (
Ctrl + Shift + D
), start the debugger (F5
) withPython: Blender Attach
configuration (orDocker: Blender Attach
). -
VSCode's Debug Console and Blender Console should show attached message
-
Update submodules1
TODO
-
Auto-reload Blender scripts
TODO