| … | … | @@ -11,7 +11,20 @@ Usage: |
| 11 | 11 | |
| 12 | 12 | import bpy |
| 13 | 13 | |
| 14 | ADDON_VERSION = "0.16.1" | |
| 14 | def _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 | ||
| 27 | ADDON_VERSION = _read_manifest_version() | |
| 15 | 28 | |
| 16 | 29 | # Support hot-reload (F3 > Reload Scripts) |
| 17 | 30 | if "shm_protocol" in locals(): |