Skip to content

Latest commit

 

History

History
96 lines (55 loc) · 2.56 KB

SETUP.md

File metadata and controls

96 lines (55 loc) · 2.56 KB

Setup

Instructions for setting up the dev environment

Read Original

Pre-reqs:

  • 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

  • Docker2
  • Remote Containers extension for VS Code (ms-vscode-remote.vscode-remote-extensionpack)2

Steps

  1. Clone the repo

    git clone --recursive https://github.com/bombsquad02420/blender-addon.git
    
    cd blender-addon
  2. Install modules for development1

    pip install -r requirements.txt
  3. Install additional modules (for Blender to use)1

    pip install --target=modules -r requirements.blender.txt
  4. Add the repo's root folder (from STEP 1) to Blender's script data path. Edit > Preferences > File Path

    Blender Preferences

  5. Search for debugger in Add-ons panel and enable the Debugger for VS Code extension. Under the extension's preferences the path (from STEP 3) to debugpy should be auto-detected.

    Debugger Addon Preferences

  6. Make sure the port is 5678 and timeout is set to a large enough value.

  7. Search for debugger and start the debugger

    Blender Start Debugger

  8. Open repo in VS Code

  9. 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 prompt

    VSCode Open in Container Prompt

    Or use the Command Palette

    VSCode Open in Container Command Palette

  10. In VSCode's Debug Panel (Ctrl + Shift + D), start the debugger (F5) with Python: Blender Attach configuration (or Docker: Blender Attach).

    VSCode Launch Debugger

  11. VSCode's Debug Console and Blender Console should show attached message

    VSCode Debugger Attached

    Blender Debugger Attached

Other Stuff

  1. Update submodules1

    TODO

  2. Auto-reload Blender scripts

    TODO

Footnotes

  1. Only if not using Docker 2 3 4 5 6

  2. Only if uusing Docker 2 3