Skip to content

Distribute COMPAS for Blender as a Blender extension - #1541

Merged
gonzalocasas merged 5 commits into
mainfrom
blender-extension
Nov 17, 2026
Merged

gonzalocasas merged 5 commits into
mainfrom
blender-extension

Conversation

@gonzalocasas

@gonzalocasas gonzalocasas commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Replaces the symlink-based compas_blender.install with a proper Blender extension (Blender 4.2+), built in CI and attached to GitHub releases.

Changes

  • extensions/blender/: add-on, manifest and build.py. Bundles the compas wheel and its dependencies (except numpy, which ships with Blender). One zip per platform and Blender range: 4.2–5.0 (Python 3.11) and 5.1+ (Python 3.13).
  • Removed compas_blender.install, compas_blender.print_python_path and their helpers and pluggables.
  • invoke build-blender-extension builds locally; bump-my-version keeps the manifest version in sync.
  • CI: the blender_extension workflow builds each package in its own job and uploads it as an individual, unzipped artifact. On release, the packages are attached to the GitHub release; a failed build doesn't block PyPI.
  • Fixed compas_blender.redraw() failing in background mode.
  • Pinned the Ubuntu runner to ubuntu-24.04, the last image with Python 3.9.
  • Docs: the Blender installation guide is rewritten.

License

Declared as SPDX:MIT and distributed by us. The Blender Extensions Platform requires GPL-3.0-or-later; publishing there later would only change the license of the wrapper add-on.

Testing

  • macOS arm64 package tested in Blender 5.2.3: installs, imports compas, draws a scene, and scipy/networkx/jsonschema work.
  • All 8 packages build in CI and can be downloaded from the latest workflow run.
  • Not tested yet: Blender 4.2–5.0, and Windows/Linux in Blender.

🤖 Generated with Claude Code

gonzalocasas and others added 3 commits November 11, 2026 14:13
Blender 4.2+ distributes add-ons as self-contained extensions. Replace the
symlink-based `compas_blender.install` with an extension that bundles the
compas wheel and its dependencies (except numpy, which ships with Blender).

- Add extensions/blender with the add-on, source manifest and build script.
  One package is built per Blender Python version (3.11 for Blender 4.2-5.0,
  3.13 for 5.1+), split per platform.
- Add `invoke build-blender-extension` and keep the manifest version in sync
  through bump-my-version.
- Remove compas_blender.install, compas_blender.print_python_path and the
  Blender path/version/bootstrapper helpers.
- Fix compas_blender.redraw failing in background mode.
- Rewrite the Blender installation docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add a reusable `blender_extension` workflow that downloads Blender, builds the
extension packages and uploads them as a workflow artifact. It runs on pull
requests touching the Blender integration and is called by the release
workflow, which attaches the packages to the GitHub release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.38%. Comparing base (0c2d98d) to head (6e96e1c).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1541      +/-   ##
==========================================
- Coverage   62.40%   62.38%   -0.02%     
==========================================
  Files         208      208              
  Lines       22487    22487              
==========================================
- Hits        14032    14028       -4     
- Misses       8455     8459       +4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Build one package per job and upload it unzipped (upload-artifact v7,
`archive: false`), so every package can be downloaded individually from the
workflow run. Add a `check` job that downloads them the same way the release
workflow does, with `skip-decompress` so the packages are not extracted.
Add a `--platform` option to build.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tomvanmele

Copy link
Copy Markdown
Member

if there is an official mechanism to make compas available then we should use it.
i approve!

@tomvanmele tomvanmele left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. just some small comments

strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-24.04, macos-latest, windows-latest] # ubuntu-24.04 is the last image with Python 3.9

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why support 3.9?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because of Rhino 8, I would suggest to support 3.9 at the very least until Rhino 9 has been officially released, otherwise we drop testing on the "main stable" target for Rhino

Comment thread docs/userguide/cad.blender.rst Outdated
The installation procedure is a work in progress.
It has currently only been tested on macOS, and may change in the future.
COMPAS is distributed as a Blender extension for Blender 4.2 and newer.
Older versions of Blender are not supported.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not -> no longer?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, true, will fix

@gonzalocasas
gonzalocasas merged commit deee5f2 into main Nov 17, 2026
22 of 23 checks passed
@gonzalocasas
gonzalocasas deleted the blender-extension branch November 17, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants