mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
OP-4361 - streamline local render
Do not do get render queue again, should be already collected.
This commit is contained in:
parent
104fc1fd83
commit
5f302eb95c
1 changed files with 10 additions and 8 deletions
|
|
@ -21,30 +21,32 @@ class ExtractLocalRender(publish.Extractor):
|
|||
def process(self, instance):
|
||||
stub = get_stub()
|
||||
staging_dir = instance.data["stagingDir"]
|
||||
self.log.info("staging_dir::{}".format(staging_dir))
|
||||
self.log.debug("staging_dir::{}".format(staging_dir))
|
||||
|
||||
# pull file name from Render Queue Output module
|
||||
comp_id = instance.data['comp_id']
|
||||
render_q = stub.get_render_info(comp_id) # re queue render item
|
||||
if not render_q:
|
||||
# pull file name collected value from Render Queue Output module
|
||||
if not instance.data["file_name"]:
|
||||
raise ValueError("No file extension set in Render Queue")
|
||||
|
||||
comp_id = instance.data['comp_id']
|
||||
stub.render(staging_dir, comp_id)
|
||||
|
||||
_, ext = os.path.splitext(os.path.basename(render_q.file_name))
|
||||
_, ext = os.path.splitext(os.path.basename(instance.data["file_name"]))
|
||||
ext = ext[1:]
|
||||
|
||||
first_file_path = None
|
||||
files = []
|
||||
for file_name in os.listdir(staging_dir):
|
||||
if not file_name.endswith(ext):
|
||||
continue
|
||||
|
||||
files.append(file_name)
|
||||
if first_file_path is None:
|
||||
first_file_path = os.path.join(staging_dir,
|
||||
file_name)
|
||||
|
||||
self.log.debug("files::{}".format(os.listdir(staging_dir)))
|
||||
if not files:
|
||||
raise ValueError("Nothing rendered!")
|
||||
self.log.info("no files")
|
||||
return
|
||||
|
||||
resulting_files = files
|
||||
if len(files) == 1:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue