Contributing to BlendCSS
This guide explains how to set up a local development environment, build the native C++ binaries for Windows and Linux, and contribute to the Python framework or documentation.
Repository Structure
| Path | Purpose |
|---|---|
blendcss/ | Core Python framework (panel.py, ui.py, core/, widgets/, binaries/) |
rmlui_engine/ | C++17 RmlUi 6.4 + FreeType + LunaSVG pybind11 extension |
cpp_bind/Cpp_compile/ | C++17 my_engine Blender DNA panel-bounds bridge |
docker/ | manylinux_2_28 Docker builder for Linux x86_64 .so binaries |
demo/ | Demo studio panel and 6 progressive showcase panels |
docs/ | VitePress documentation site (Diátaxis structure) |
Python & Blender Development
- Clone the repository and enable it as an addon in Blender 4.2–4.5 (Python 3.11) or Blender 5.0+ (Python 3.13).
- Keep Python changes compatible with both Python 3.11 and 3.13, and verify theme sync across Blender 4.x and 5.x when touching
blendcss/widgets/theme.py. - Run a quick syntax check before committing:
powershell
python -m compileall blendcss demoBuilding Native Binaries
External C++ dependencies (RmlUi, FreeType, blender-main) are excluded from Git via .gitignore and cloned on demand.
Linux x86_64 (Docker / WSL2)
Builds portable glibc 2.28 .so binaries for both Python 3.11 and Python 3.13 into blendcss/binaries/:
bash
docker build -f docker/Dockerfile.linux -t blendcss-linux-builder .
docker run --rm -v "$(pwd):/workspace" blendcss-linux-builderWindows x64
rmlui_engine: Clone RmlUi (rmlui_engine/rmlui) and FreeType (rmlui_engine/freetype), then run.\rmlui_engine\build.ps1.my_engine: Clone Blender (cpp_bind/Cpp_compile/blender-mainor setBLENDER_SOURCE_DIR), then runpython setup.py build_ext --inplaceinsidecpp_bind/Cpp_compile/from a Visual Studio 2022 x64 Developer Prompt and copy the.pydintoblendcss/binaries/.
Documentation & Showcase
Preview and validate the VitePress site locally:
powershell
cd docs
npm install
npm run dev
npm run buildWhen changing demo/showcase_panels.py, regenerate the showcase screenshots and hero banner:
powershell
& "C:\Program Files\Blender Foundation\Blender 5.2\blender.exe" --factory-startup -P scratch\render_showcase.py
python scratch\generate_hero.pyPull Request Guidelines
- Keep PRs focused on a single feature, fix, or documentation improvement.
- Update the matching Reference or How-to page in
docs/when changing public APIs. - Confirm
npm --prefix docs run buildsucceeds with zero dead links. - State the Blender version(s) and OS you tested in your PR description.