Settings Window (#124)

* Initial commit for settings window

* More WIP for the Settings panel

* Added Local Files section to Settings

* More WIP on Settings

* Add ability to ignore system builds

* Improvements to Launch and Delete buttons

* Fix issue where icons were not loading

* Network password settings WIP

* Update label

* Import and naming fixes

* Speed improvements to launch

* Update requirements.txt

* Update Windows CPU name lookup

* Add missing default values to a few settings

* More settings fixes

* Fix Windows Path issue

* Added hard types for getting settings values

* More UI cleanup

* Correctly refresh Engines list after downloading new engine

* Improve downloader with UI progress

* More download improvements

* Add Settings Button to Toolbar
This commit is contained in:
2025-12-28 12:33:29 -06:00
committed by GitHub
parent daf445ee9e
commit 4704806472
13 changed files with 733 additions and 129 deletions

View File

@@ -8,8 +8,7 @@ from src.engines.blender.blender_engine import Blender
from src.engines.core.base_downloader import EngineDownloader
from src.utilities.misc_helper import current_system_os, current_system_cpu
# url = "https://download.blender.org/release/"
url = "https://ftp.nluug.nl/pub/graphics/blender/release/" # much faster mirror for testing
url = "https://download.blender.org/release/"
logger = logging.getLogger()
supported_formats = ['.zip', '.tar.xz', '.dmg']
@@ -88,8 +87,8 @@ class BlenderDownloader(EngineDownloader):
threads = []
results = [[] for _ in majors]
def thread_function(major_version, index, system_os, cpu):
results[index] = cls.__get_minor_versions(major_version, system_os, cpu)
def thread_function(major_version, index, system_os_t, cpu_t):
results[index] = cls.__get_minor_versions(major_version, system_os_t, cpu_t)
for i, m in enumerate(majors):
thread = threading.Thread(target=thread_function, args=(m, i, system_os, cpu))
@@ -126,7 +125,7 @@ class BlenderDownloader(EngineDownloader):
return None
@classmethod
def download_engine(cls, version, download_location, system_os=None, cpu=None, timeout=120):
def download_engine(cls, version, download_location, system_os=None, cpu=None, timeout=120, progress_callback=None):
system_os = system_os or current_system_os()
cpu = cpu or current_system_cpu()
@@ -136,7 +135,7 @@ class BlenderDownloader(EngineDownloader):
minor_versions = [x for x in cls.__get_minor_versions(major_version, system_os, cpu) if
x['version'] == version]
cls.download_and_extract_app(remote_url=minor_versions[0]['url'], download_location=download_location,
timeout=timeout)
timeout=timeout, progress_callback=progress_callback)
except IndexError:
logger.error("Cannot find requested engine")