Add Blender plugin (#134)

* Unbind hostname to allow localhost submissions

* Fix issue where multiple cameras were outputting to the same directory

* Add Blender plugin
This commit is contained in:
2026-06-06 14:32:48 -05:00
committed by GitHub
parent f0be78adcc
commit b8b71d1e16
8 changed files with 856 additions and 5 deletions
+3 -3
View File
@@ -36,7 +36,7 @@ ssl._create_default_https_context = ssl._create_unverified_context # disable SS
API_VERSION = "0.1"
def start_api_server(hostname: Optional[str] = None) -> None:
def start_api_server(hostname: Optional[str] = None, bind_host: str = '0.0.0.0') -> None:
# get hostname
if not hostname:
@@ -54,9 +54,9 @@ def start_api_server(hostname: Optional[str] = None) -> None:
flask_log = logging.getLogger('werkzeug')
flask_log.setLevel(Config.flask_log_level.upper())
logger.debug('Starting API server')
logger.debug(f'Starting API server on {bind_host}:{server.config["PORT"]}')
try:
server.run(host=hostname, port=server.config['PORT'], debug=Config.flask_debug_enable, use_reloader=False,
server.run(host=bind_host, port=server.config['PORT'], debug=Config.flask_debug_enable, use_reloader=False,
threaded=True)
finally:
logger.debug('Stopping API server')
+1
View File
@@ -37,6 +37,7 @@ class JobImportHandler:
processed_child_job_data = processed_job_data.copy()
processed_child_job_data.pop("child_jobs")
processed_child_job_data.update(child_job_diffs)
processed_child_job_data['__use_output_subdir'] = True
job_data_to_create.append(processed_child_job_data)
else:
job_data_to_create.append(processed_job_data)
+4 -2
View File
@@ -100,10 +100,12 @@ class DistributedJobManager:
# --------------------------------------------
def _create_render_job(self, new_job_attributes: dict, loaded_project_local_path: Path):
output_path = new_job_attributes.get('output_path')
output_filename = loaded_project_local_path.name if output_path else loaded_project_local_path.stem
requested_output_path = new_job_attributes.get('output_path')
output_filename = Path(str(requested_output_path)).name if requested_output_path else loaded_project_local_path.stem
output_dir = loaded_project_local_path.parent.parent / "output"
if new_job_attributes.get('__use_output_subdir'):
output_dir = output_dir / output_filename
output_path = output_dir / output_filename
os.makedirs(output_dir, exist_ok=True)
logger.debug(f"New job output path: {output_path}")