From e174dd222b60479f0279a6cc9ef06b061edd4761 Mon Sep 17 00:00:00 2001 From: Dominik Winkelbauer Date: Thu, 31 Aug 2023 09:10:07 +0200 Subject: [PATCH] fix(windows): Fixes usage of custom blender path on windows --- blenderproc/python/utility/InstallUtility.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/blenderproc/python/utility/InstallUtility.py b/blenderproc/python/utility/InstallUtility.py index 47388e4ae..6c6394fba 100644 --- a/blenderproc/python/utility/InstallUtility.py +++ b/blenderproc/python/utility/InstallUtility.py @@ -97,7 +97,8 @@ def make_sure_blender_is_installed(custom_blender_path: str, blender_install_pat elif platform == "win32": blender_version += "-windows-x64" blender_install_path = os.path.join(blender_install_path, blender_version) - blender_path = blender_install_path + # After unpacking there is another subfolder named blender_version + blender_path = os.path.join(blender_install_path, blender_version) else: raise RuntimeError(f"This system is not supported yet: {platform}") @@ -218,7 +219,7 @@ def __call__(self, block_num, block_size, total_size): elif platform == "darwin": blender_run_path = os.path.join(blender_path, "Contents", "MacOS", "Blender") elif platform == "win32": - blender_run_path = os.path.join(blender_install_path, blender_version, "blender") + blender_run_path = os.path.join(blender_path, "blender") else: raise RuntimeError(f"This system is not supported yet: {platform}")