Windows path fixes (#129)

* Change uses of os.path to use Pathlib

* Add return types and type hints

* Add more docstrings

* Add missing import to api_server
This commit is contained in:
2026-01-18 00:18:43 -06:00
committed by GitHub
parent ee9f44e4c4
commit 74dce5cc3d
15 changed files with 536 additions and 262 deletions
+3 -3
View File
@@ -1,8 +1,8 @@
import json
import re
from pathlib import Path
from src.engines.core.base_engine import *
from src.utilities.misc_helper import system_safe_path
logger = logging.getLogger()
@@ -89,7 +89,7 @@ class Blender(BaseRenderEngine):
scene_info = {}
try:
script_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'scripts', 'get_file_info.py')
results = self.run_python_script(project_path=project_path, script_path=system_safe_path(script_path),
results = self.run_python_script(project_path=project_path, script_path=Path(script_path),
timeout=timeout)
result_text = results.stdout.decode()
for line in result_text.splitlines():
@@ -110,7 +110,7 @@ class Blender(BaseRenderEngine):
try:
logger.info(f"Starting to pack Blender file: {project_path}")
script_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'scripts', 'pack_project.py')
results = self.run_python_script(project_path=project_path, script_path=system_safe_path(script_path),
results = self.run_python_script(project_path=project_path, script_path=Path(script_path),
timeout=timeout)
result_text = results.stdout.decode()