Extension-Packaging: blender_manifest.toml + Build-Skript + dist/ (Zip + index.json)
Installierbar als Remote-Extension via Gitea-Raw-URL, Updates per Klick. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,9 @@ rock_presets.json
|
||||
*.blend1
|
||||
*.blend2
|
||||
|
||||
# Extension-Build-Staging (dist/ wird bewusst committet -> Hosting via Raw-URL)
|
||||
_extsrc/
|
||||
|
||||
# OS / Editor
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
@@ -24,6 +24,34 @@ Update: einfach die neue `.py` erneut installieren (gleicher Modulname) oder das
|
||||
Repo lokal ziehen und den Addon-Pfad in den Preferences auf den Repo-Ordner
|
||||
zeigen lassen.
|
||||
|
||||
## Installation als Extension (via URL, mit Auto-Update)
|
||||
|
||||
Ab Blender 4.2 / 5.x als **Remote-Extension-Repository** – einmal die URL
|
||||
eintragen, danach gehen Updates per Klick.
|
||||
|
||||
1. Das Gitea-Repo muss **oeffentlich** sein (sonst kann Blender die Raw-URL nicht
|
||||
ohne Login laden).
|
||||
2. Blender → *Edit → Preferences → Get Extensions → oben rechts das Dropdown →
|
||||
Repositories → „Add Remote Repository"*.
|
||||
3. Als URL eintragen:
|
||||
|
||||
```
|
||||
https://git.d4rkst3r.de/D4rkst3r/stylized-rock-generator/raw/branch/main/dist/index.json
|
||||
```
|
||||
|
||||
4. „Check for Updates" aktivieren, bestaetigen. Die Extension erscheint in der
|
||||
Liste → *Install*.
|
||||
|
||||
**Updaten (Maintainer-Seite):**
|
||||
|
||||
1. `version` in `blender_manifest.toml` (und `bl_info["version"]` in der `.py`) erhoehen.
|
||||
2. `./build.ps1` (oder `blender --command extension build …` + `… server-generate …`).
|
||||
3. `git add -A && git commit -m "vX.Y.Z" && git push`.
|
||||
4. Nutzer: in Blender *Check for Updates* → *Update*.
|
||||
|
||||
Das gebaute Zip + `index.json` liegen in `dist/` und werden bewusst mitversioniert,
|
||||
damit die Raw-URL sie ausliefert.
|
||||
|
||||
---
|
||||
|
||||
## Features
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
schema_version = "1.0.0"
|
||||
|
||||
id = "stylized_rock_generator"
|
||||
version = "2.0.0"
|
||||
name = "Stylized Rock Generator"
|
||||
tagline = "Batch-Generator fuer stylized Rocks mit UE5-Export"
|
||||
maintainer = "D4rkst3r"
|
||||
type = "add-on"
|
||||
|
||||
website = "https://git.d4rkst3r.de/D4rkst3r/stylized-rock-generator"
|
||||
|
||||
# Gueltige Add-on-Tags laut Blender-Extension-Spezifikation.
|
||||
tags = ["Object", "Mesh", "Modeling"]
|
||||
|
||||
blender_version_min = "4.2.0"
|
||||
|
||||
license = [
|
||||
"SPDX:GPL-3.0-or-later",
|
||||
]
|
||||
|
||||
copyright = [
|
||||
"2026 D4rkst3r",
|
||||
]
|
||||
@@ -0,0 +1,40 @@
|
||||
# Baut die Extension und aktualisiert das Repo-Listing (index.json) in dist/.
|
||||
#
|
||||
# Aufruf:
|
||||
# .\build.ps1 # nutzt "blender" aus dem PATH
|
||||
# .\build.ps1 -Blender "E:\...\blender.exe"
|
||||
#
|
||||
# Update-Workflow:
|
||||
# 1. version in blender_manifest.toml erhoehen (und bl_info/version in der .py)
|
||||
# 2. .\build.ps1
|
||||
# 3. git add -A; git commit -m "vX.Y.Z"; git push
|
||||
# 4. In Blender: Preferences -> Get Extensions -> Repo -> "Check for Updates"
|
||||
|
||||
param(
|
||||
[string]$Blender = "blender"
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$root = $PSScriptRoot
|
||||
$stage = Join-Path $root "_extsrc"
|
||||
$dist = Join-Path $root "dist"
|
||||
|
||||
if (Test-Path $stage) { Remove-Item -Recurse -Force $stage }
|
||||
New-Item -ItemType Directory -Force -Path $stage | Out-Null
|
||||
New-Item -ItemType Directory -Force -Path $dist | Out-Null
|
||||
|
||||
# Staging: Manifest + Addon-Code als __init__.py (Extension = Package)
|
||||
Copy-Item (Join-Path $root "blender_manifest.toml") (Join-Path $stage "blender_manifest.toml")
|
||||
Copy-Item (Join-Path $root "stylized_rock_generator.py") (Join-Path $stage "__init__.py")
|
||||
|
||||
Write-Host "== extension build ==" -ForegroundColor Cyan
|
||||
& $Blender --command extension build --source-dir $stage --output-dir $dist
|
||||
if ($LASTEXITCODE -ne 0) { throw "extension build fehlgeschlagen (Exit $LASTEXITCODE)" }
|
||||
|
||||
Write-Host "== server-generate (index.json) ==" -ForegroundColor Cyan
|
||||
& $Blender --command extension server-generate --repo-dir $dist
|
||||
if ($LASTEXITCODE -ne 0) { throw "server-generate fehlgeschlagen (Exit $LASTEXITCODE)" }
|
||||
|
||||
Remove-Item -Recurse -Force $stage
|
||||
Write-Host "Fertig. dist/ enthaelt Zip + index.json." -ForegroundColor Green
|
||||
Get-ChildItem $dist | Select-Object Name, Length | Format-Table -AutoSize
|
||||
Vendored
+31
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"version": "v1",
|
||||
"blocklist": [],
|
||||
"data": [
|
||||
{
|
||||
"schema_version": "1.0.0",
|
||||
"id": "stylized_rock_generator",
|
||||
"name": "Stylized Rock Generator",
|
||||
"tagline": "Batch-Generator fuer stylized Rocks mit UE5-Export",
|
||||
"version": "2.0.0",
|
||||
"type": "add-on",
|
||||
"maintainer": "D4rkst3r",
|
||||
"license": [
|
||||
"SPDX:GPL-3.0-or-later"
|
||||
],
|
||||
"blender_version_min": "4.2.0",
|
||||
"website": "https://git.d4rkst3r.de/D4rkst3r/stylized-rock-generator",
|
||||
"copyright": [
|
||||
"2026 D4rkst3r"
|
||||
],
|
||||
"tags": [
|
||||
"Object",
|
||||
"Mesh",
|
||||
"Modeling"
|
||||
],
|
||||
"archive_url": "./stylized_rock_generator-2.0.0.zip",
|
||||
"archive_size": 9183,
|
||||
"archive_hash": "sha256:7bcf0d9cc56015157dfa17264d9ea51e624e8c0013f84b59069bcd3386815ad6"
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
Binary file not shown.
Reference in New Issue
Block a user