This commit is contained in:
Andrej730
2025-07-28 11:45:12 +05:00
parent 23944d6060
commit cdeeab4b31
20 changed files with 161 additions and 134 deletions
+6 -3
View File
@@ -64,6 +64,7 @@ def find_bonsai_path() -> Union[Path, None]:
if path.exists():
return path
# BONSAI_PATH: Path to 'bonsai' extension folder inside BLENDER_PATH.
# Typically resolved automatically, paths priority can be found in `find_bonsai_path`.
#
@@ -77,6 +78,7 @@ BONSAI_PATH = find_bonsai_path()
# Never changed by user.
PACKAGE_PATH = BLENDER_PATH / r"extensions/.local/lib/python3.11/site-packages"
def main() -> None:
global REPO_PATH
@@ -98,9 +100,10 @@ def main() -> None:
assert REPO_PATH.exists(), f"Path '{REPO_PATH=!s}' doesn't exist, ensure variable is set correctly."
assert BLENDER_PATH.exists(), f"Path '{BLENDER_PATH=!s}' doesn't exist, ensure variable is set correctly."
assert PACKAGE_PATH.exists(), f"Path '{PACKAGE_PATH=!s}' doesn't exist, ensure variable is set correctly."
assert BONSAI_PATH is not None, (
"Couldn't find BONSAI_PATH in any of the paths candidates. "
"Example paths: {}".format("\n".join(str(p) for p in BONSAI_PATH_CANDIDATES))
assert (
BONSAI_PATH is not None
), "Couldn't find BONSAI_PATH in any of the paths candidates. Example paths: {}".format(
"\n".join(str(p) for p in BONSAI_PATH_CANDIDATES)
)
input("Confirm the settings above and press Enter to continue or Ctrl-C to cancel...")