OverviewFilesCommitsIssuesDocsReleasesPeers

blender-bridge commits / afe474d

Read addon version from manifest instead of hardcoded constant
ADDON_VERSION was hardcoded in __init__.py and never updated, while blender_manifest.toml had the correct version. Now reads from the manifest file as single source of truth. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
afe474d57c3bc5889c8d5f1046073aa8695e72ef
by plankatron <fleeky@gmail.com> · 2026-03-04T19:29:47.000Z

Changed files (2) +14 -1

blender_addon/__init__.py +14 -1
……@@ -11,7 +11,20 @@ Usage:
1111
1212import bpy
1313
14ADDON_VERSION = "0.16.1"
14def _read_manifest_version() -> str:
15 """Read version from blender_manifest.toml (single source of truth)."""
16 import os
17 manifest = os.path.join(os.path.dirname(__file__), "blender_manifest.toml")
18 try:
19 with open(manifest) as f:
20 for line in f:
21 if line.startswith("version"):
22 return line.split("=", 1)[1].strip().strip('"')
23 except OSError:
24 pass
25 return "unknown"
26
27ADDON_VERSION = _read_manifest_version()
1528
1629# Support hot-reload (F3 > Reload Scripts)
1730if "shm_protocol" in locals():
blender_bridge_addon.zip +0 -0
(no content changes — binary or rename)