From d8ae77f159e154da59bedcba999f0dce6c777d3e Mon Sep 17 00:00:00 2001 From: Carson Katri Date: Sun, 11 Oct 2026 14:11:43 -0400 Subject: [PATCH 1/2] Support drag and drop installs from the README Publish an extension repository index.json with the nightly release so a link to one of its ZIPs can be dropped into Blender to install it. The release notes, README and book list a link for each Blender version. --- .github/workflows/build.yml | 18 +++++++++-- README.md | 10 ++++++ book/src/setup/installation.md | 9 ++++++ tools/release_notes.py | 57 ++++++++++++++++++++++++++++++++++ 4 files changed, 92 insertions(+), 2 deletions(-) create mode 100644 tools/release_notes.py diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e7c04fa..b7686bb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -87,20 +87,34 @@ jobs: permissions: contents: write steps: + - uses: actions/checkout@v4 + - uses: actions/download-artifact@v4 with: pattern: geometry_script-blender-* path: dist merge-multiple: true + # The release doubles as a static extension repository, so a link to one of + # its ZIPs with `?repository=./index.json` can be dropped into Blender. + # Blender's repository generator is a standalone script, so no Blender download is needed. + - name: Generate extension repository + run: | + curl -fsSL -o "$RUNNER_TEMP/blender_ext.py" \ + https://raw.githubusercontent.com/blender/blender/v5.2.0/scripts/addons_core/bl_pkg/cli/blender_ext.py + python3 "$RUNNER_TEMP/blender_ext.py" server-generate --repo-dir dist + python3 tools/release_notes.py dist/index.json \ + --base-url "https://github.com/${{ github.repository }}/releases/download/nightly/" \ + --commit "${GITHUB_SHA::7}" > "$RUNNER_TEMP/notes.md" + - name: Publish nightly prerelease env: GH_TOKEN: ${{ github.token }} GH_REPO: ${{ github.repository }} run: | gh release delete nightly --yes --cleanup-tag || true - gh release create nightly dist/*.zip \ + gh release create nightly dist/*.zip dist/index.json \ --prerelease \ --target "$GITHUB_SHA" \ --title "Nightly" \ - --notes "Built from ${GITHUB_SHA::7}. Install the zip matching your Blender version from Preferences > Get Extensions > Install from Disk." + --notes-file "$RUNNER_TEMP/notes.md" diff --git a/README.md b/README.md index af1b908..bcb582f 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,16 @@ def repeat_grid(geometry: Geometry, width: int = 3, height: int = 3): ## Installation Geometry Script is a Blender extension and requires Blender 5.2 or newer. +Drag the link for your Blender version into Blender to install it: + +- [Geometry Script for Blender 5.2](https://github.com/carson-katri/geometry-script/releases/download/nightly/geometry_script-1.0.0-blender-5.2.zip?repository=./index.json&blender_version_min=5.2.0&blender_version_max=5.3.0) +- [Geometry Script for Blender 5.3](https://github.com/carson-katri/geometry-script/releases/download/nightly/geometry_script-1.0.0-blender-5.3.zip?repository=./index.json&blender_version_min=5.3.0&blender_version_max=5.4.0) +- [Geometry Script for Blender 5.4](https://github.com/carson-katri/geometry-script/releases/download/nightly/geometry_script-1.0.0-blender-5.4.zip?repository=./index.json&blender_version_min=5.4.0&blender_version_max=5.5.0) + +Blender asks to allow online access if it's off, then to add the Geometry Script repository, then confirms the install. The [`nightly` release](https://github.com/carson-katri/geometry-script/releases/tag/nightly) always lists the links for every Blender version with a build. + +To install manually instead: + 1. Download the ZIP matching your Blender version from the [`nightly` release](https://github.com/carson-katri/geometry-script/releases/tag/nightly), e.g. `geometry_script-1.0.0-blender-5.2.zip` 2. Open *Blender* > *Preferences* > *Get Extensions* 3. Open the dropdown at the top right, choose *Install from Disk...* and select the downloaded ZIP file diff --git a/book/src/setup/installation.md b/book/src/setup/installation.md index b62c0e9..37e6395 100644 --- a/book/src/setup/installation.md +++ b/book/src/setup/installation.md @@ -4,6 +4,15 @@ Geometry Script is a Blender extension and requires **Blender 5.2** or newer. Each build of the extension is generated for one Blender version, so its node functions match the nodes in that version exactly. Download the build that matches the version of Blender you use. +## Drag and drop +Drag the link for your Blender version into Blender: + +- [Geometry Script for Blender 5.2](https://github.com/carson-katri/geometry-script/releases/download/nightly/geometry_script-1.0.0-blender-5.2.zip?repository=./index.json&blender_version_min=5.2.0&blender_version_max=5.3.0) +- [Geometry Script for Blender 5.3](https://github.com/carson-katri/geometry-script/releases/download/nightly/geometry_script-1.0.0-blender-5.3.zip?repository=./index.json&blender_version_min=5.3.0&blender_version_max=5.4.0) +- [Geometry Script for Blender 5.4](https://github.com/carson-katri/geometry-script/releases/download/nightly/geometry_script-1.0.0-blender-5.4.zip?repository=./index.json&blender_version_min=5.4.0&blender_version_max=5.5.0) + +Blender asks to allow online access if it's off, then offers to add the Geometry Script repository and install the extension. The [`nightly` release](https://github.com/carson-katri/geometry-script/releases/tag/nightly) lists the links for every Blender version with a build. + ## From GitHub 1. Download the ZIP matching your Blender version from the [`nightly` release](https://github.com/carson-katri/geometry-script/releases/tag/nightly), e.g. `geometry_script-1.0.0-blender-5.2.zip` 2. Open *Blender* > *Preferences* > *Get Extensions* diff --git a/tools/release_notes.py b/tools/release_notes.py new file mode 100644 index 0000000..0bd4e5c --- /dev/null +++ b/tools/release_notes.py @@ -0,0 +1,57 @@ +"""Print the release notes for a build with a drag and drop link per Blender series. + + python tools/release_notes.py dist/index.json --base-url https://github.com//releases/download// + +``index.json`` is the extension repository listing written by Blender's +``extension server-generate`` next to the ZIP files. Dropping one of the links +into Blender offers to add that repository and install the matching build. +""" + +from __future__ import annotations + +import argparse +import json +import sys +import urllib.parse +from pathlib import Path + + +def drop_url(base_url: str, package: dict[str, str]) -> str: + query = {"repository": "./index.json", "blender_version_min": package["blender_version_min"]} + if "blender_version_max" in package: + query["blender_version_max"] = package["blender_version_max"] + archive = package["archive_url"].removeprefix("./") + return f"{base_url.rstrip('/')}/{archive}?{urllib.parse.urlencode(query, safe='/')}" + + +def main() -> int: + parser = argparse.ArgumentParser(description=__doc__.splitlines()[0]) + parser.add_argument("index", type=Path, help="Repository listing (index.json)") + parser.add_argument("--base-url", required=True, help="URL the ZIP files and index.json are served from") + parser.add_argument("--commit", default="", help="Commit the packages were built from") + args = parser.parse_args() + + packages = json.loads(args.index.read_text(encoding="utf-8"))["data"] + packages.sort(key=lambda package: tuple(int(part) for part in package["blender_version_min"].split("."))) + + lines = [] + if args.commit: + lines += [f"Built from {args.commit}.", ""] + lines += [ + "Drag the link for your Blender version into Blender to install it:", + "", + ] + for package in packages: + series = ".".join(package["blender_version_min"].split(".")[:2]) + lines.append(f"- [Geometry Script for Blender {series}]({drop_url(args.base_url, package)})") + lines += [ + "", + "Or download the ZIP matching your Blender version and install it from " + "Preferences > Get Extensions > Install from Disk.", + ] + print("\n".join(lines)) + return 0 + + +if __name__ == "__main__": + sys.exit(main()) From 4bf997e4600f5227dbe536df446919345720b03f Mon Sep 17 00:00:00 2001 From: Carson Katri Date: Sun, 11 Oct 2026 14:12:57 -0400 Subject: [PATCH 2/2] Style the drag and drop install links as dashed boxes The book uses CSS. GitHub strips styles from READMEs, so the README links light and dark SVG badges instead. --- README.md | 10 +++-- book/src/images/install/blender-5.2-dark.svg | 7 ++++ book/src/images/install/blender-5.2-light.svg | 7 ++++ book/src/images/install/blender-5.3-dark.svg | 7 ++++ book/src/images/install/blender-5.3-light.svg | 7 ++++ book/src/images/install/blender-5.4-dark.svg | 7 ++++ book/src/images/install/blender-5.4-light.svg | 7 ++++ book/src/setup/installation.md | 21 +++++++--- book/style.css | 40 ++++++++++++++++++- 9 files changed, 103 insertions(+), 10 deletions(-) create mode 100644 book/src/images/install/blender-5.2-dark.svg create mode 100644 book/src/images/install/blender-5.2-light.svg create mode 100644 book/src/images/install/blender-5.3-dark.svg create mode 100644 book/src/images/install/blender-5.3-light.svg create mode 100644 book/src/images/install/blender-5.4-dark.svg create mode 100644 book/src/images/install/blender-5.4-light.svg diff --git a/README.md b/README.md index bcb582f..c367708 100644 --- a/README.md +++ b/README.md @@ -34,11 +34,13 @@ def repeat_grid(geometry: Geometry, width: int = 3, height: int = 3): ## Installation Geometry Script is a Blender extension and requires Blender 5.2 or newer. -Drag the link for your Blender version into Blender to install it: +Drag the box for your Blender version into Blender to install it: -- [Geometry Script for Blender 5.2](https://github.com/carson-katri/geometry-script/releases/download/nightly/geometry_script-1.0.0-blender-5.2.zip?repository=./index.json&blender_version_min=5.2.0&blender_version_max=5.3.0) -- [Geometry Script for Blender 5.3](https://github.com/carson-katri/geometry-script/releases/download/nightly/geometry_script-1.0.0-blender-5.3.zip?repository=./index.json&blender_version_min=5.3.0&blender_version_max=5.4.0) -- [Geometry Script for Blender 5.4](https://github.com/carson-katri/geometry-script/releases/download/nightly/geometry_script-1.0.0-blender-5.4.zip?repository=./index.json&blender_version_min=5.4.0&blender_version_max=5.5.0) +

+Geometry Script for Blender 5.2 +Geometry Script for Blender 5.3 +Geometry Script for Blender 5.4 +

Blender asks to allow online access if it's off, then to add the Geometry Script repository, then confirms the install. The [`nightly` release](https://github.com/carson-katri/geometry-script/releases/tag/nightly) always lists the links for every Blender version with a build. diff --git a/book/src/images/install/blender-5.2-dark.svg b/book/src/images/install/blender-5.2-dark.svg new file mode 100644 index 0000000..89ea9aa --- /dev/null +++ b/book/src/images/install/blender-5.2-dark.svg @@ -0,0 +1,7 @@ + + + + Blender 5.2 + Drag into Blender + + diff --git a/book/src/images/install/blender-5.2-light.svg b/book/src/images/install/blender-5.2-light.svg new file mode 100644 index 0000000..a059af3 --- /dev/null +++ b/book/src/images/install/blender-5.2-light.svg @@ -0,0 +1,7 @@ + + + + Blender 5.2 + Drag into Blender + + diff --git a/book/src/images/install/blender-5.3-dark.svg b/book/src/images/install/blender-5.3-dark.svg new file mode 100644 index 0000000..7dd833f --- /dev/null +++ b/book/src/images/install/blender-5.3-dark.svg @@ -0,0 +1,7 @@ + + + + Blender 5.3 + Drag into Blender + + diff --git a/book/src/images/install/blender-5.3-light.svg b/book/src/images/install/blender-5.3-light.svg new file mode 100644 index 0000000..6d23a22 --- /dev/null +++ b/book/src/images/install/blender-5.3-light.svg @@ -0,0 +1,7 @@ + + + + Blender 5.3 + Drag into Blender + + diff --git a/book/src/images/install/blender-5.4-dark.svg b/book/src/images/install/blender-5.4-dark.svg new file mode 100644 index 0000000..d9b1bf4 --- /dev/null +++ b/book/src/images/install/blender-5.4-dark.svg @@ -0,0 +1,7 @@ + + + + Blender 5.4 + Drag into Blender + + diff --git a/book/src/images/install/blender-5.4-light.svg b/book/src/images/install/blender-5.4-light.svg new file mode 100644 index 0000000..2096bcd --- /dev/null +++ b/book/src/images/install/blender-5.4-light.svg @@ -0,0 +1,7 @@ + + + + Blender 5.4 + Drag into Blender + + diff --git a/book/src/setup/installation.md b/book/src/setup/installation.md index 37e6395..47e9436 100644 --- a/book/src/setup/installation.md +++ b/book/src/setup/installation.md @@ -5,11 +5,22 @@ Geometry Script is a Blender extension and requires **Blender 5.2** or newer. Each build of the extension is generated for one Blender version, so its node functions match the nodes in that version exactly. Download the build that matches the version of Blender you use. ## Drag and drop -Drag the link for your Blender version into Blender: - -- [Geometry Script for Blender 5.2](https://github.com/carson-katri/geometry-script/releases/download/nightly/geometry_script-1.0.0-blender-5.2.zip?repository=./index.json&blender_version_min=5.2.0&blender_version_max=5.3.0) -- [Geometry Script for Blender 5.3](https://github.com/carson-katri/geometry-script/releases/download/nightly/geometry_script-1.0.0-blender-5.3.zip?repository=./index.json&blender_version_min=5.3.0&blender_version_max=5.4.0) -- [Geometry Script for Blender 5.4](https://github.com/carson-katri/geometry-script/releases/download/nightly/geometry_script-1.0.0-blender-5.4.zip?repository=./index.json&blender_version_min=5.4.0&blender_version_max=5.5.0) +Drag the box for your Blender version into Blender: + + Blender asks to allow online access if it's off, then offers to add the Geometry Script repository and install the extension. The [`nightly` release](https://github.com/carson-katri/geometry-script/releases/tag/nightly) lists the links for every Blender version with a build. diff --git a/book/style.css b/book/style.css index 73e1fda..2043a8c 100644 --- a/book/style.css +++ b/book/style.css @@ -1,3 +1,41 @@ .coal { --bg: #1C1C1C !important; -} \ No newline at end of file +} +.extension-drops { + display: flex; + flex-wrap: wrap; + gap: 12px; + margin: 16px 0; +} + +.extension-drops a.extension-drop { + display: flex; + flex-direction: column; + gap: 4px; + flex: 1 1 140px; + padding: 16px; + border: 2px dashed var(--links); + border-radius: 8px; + text-decoration: none; + text-align: center; + cursor: grab; +} + +.extension-drops a.extension-drop:hover { + background: var(--theme-hover); + text-decoration: none; +} + +.extension-drops a.extension-drop:active { + cursor: grabbing; +} + +.extension-drop-title { + color: var(--fg); + font-weight: bold; +} + +.extension-drop-hint { + color: var(--icons); + font-size: 0.85em; +}