mirror of
https://github.com/blw1138/Zordon.git
synced 2025-12-17 16:58:12 +00:00
Add job polish (#63)
* Remove legacy client * Misc cleanup * Add message box after submission success / fail * Use a new is_localhost method to handle localhost not including '.local' * Code cleanup * Fix issue where engine browser would think we're downloading forever * Add message box after submission success / fail * Use a new is_localhost method to handle localhost not including '.local' * Code cleanup * Fix issue where engine browser would think we're downloading forever * Add pubsub messages to serverproxy_manager.py * Add resolution, fps and renderer versions to add_job.py * Add cameras to add_job.py * Add message box after submission success / fail * Use a new is_localhost method to handle localhost not including '.local' * Code cleanup * Fix issue where engine browser would think we're downloading forever * Add message box after submission success / fail * Code cleanup * Add cameras to add_job.py * Add dynamic engine options and output format * Move UI work out of BG threads and add engine presubmission tasks * Submit dynamic args when creating a new job * Hide groups and show messagebox after submission * Choose file when pressing New Job in main window now
This commit is contained in:
@@ -63,7 +63,7 @@ class Blender(BaseRenderEngine):
|
||||
raise FileNotFoundError(f'Python script not found: {script_path}')
|
||||
raise Exception("Uncaught exception")
|
||||
|
||||
def get_scene_info(self, project_path, timeout=10):
|
||||
def get_project_info(self, project_path, timeout=10):
|
||||
scene_info = {}
|
||||
try:
|
||||
script_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'scripts', 'get_file_info.py')
|
||||
@@ -138,6 +138,7 @@ class Blender(BaseRenderEngine):
|
||||
return options
|
||||
|
||||
def get_detected_gpus(self):
|
||||
# no longer works on 4.0
|
||||
engine_output = subprocess.run([self.renderer_path(), '-E', 'help'], timeout=SUBPROCESS_TIMEOUT,
|
||||
capture_output=True).stdout.decode('utf-8')
|
||||
gpu_names = re.findall(r"DETECTED GPU: (.+)", engine_output)
|
||||
@@ -149,6 +150,17 @@ class Blender(BaseRenderEngine):
|
||||
render_engines = [x.strip() for x in engine_output.split('Blender Engine Listing:')[-1].strip().splitlines()]
|
||||
return render_engines
|
||||
|
||||
# UI and setup
|
||||
def get_options(self):
|
||||
options = [
|
||||
{'name': 'engine', 'options': self.supported_render_engines()},
|
||||
]
|
||||
return options
|
||||
|
||||
def perform_presubmission_tasks(self, project_path):
|
||||
packed_path = self.pack_project_file(project_path, timeout=30)
|
||||
return packed_path
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
x = Blender.get_detected_gpus()
|
||||
|
||||
Reference in New Issue
Block a user