Add render engines to system_info

This commit is contained in:
Brett Williams
2024-08-08 23:13:31 -05:00
parent 51a5a63944
commit a4ff36ac56

View File

@@ -1,5 +1,6 @@
import json import json
import re import re
from concurrent.futures import ThreadPoolExecutor
from src.engines.core.base_engine import * from src.engines.core.base_engine import *
from src.utilities.misc_helper import system_safe_path from src.utilities.misc_helper import system_safe_path
@@ -148,7 +149,13 @@ class Blender(BaseRenderEngine):
return options return options
def system_info(self): def system_info(self):
return {'render_devices': self.get_render_devices()} with ThreadPoolExecutor() as executor:
future_render_devices = executor.submit(self.get_render_devices)
future_engines = executor.submit(self.supported_render_engines)
render_devices = future_render_devices.result()
engines = future_engines.result()
return {'render_devices': render_devices, 'engines': engines}
def get_render_devices(self): def get_render_devices(self):
script_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'scripts', 'get_system_info.py') script_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'scripts', 'get_system_info.py')