Merge pull request #2754 from pypeclub/bugfix/OP-2669_Harmony-use_published-for-rendering-on-DL-not-working

Harmony: Rendering in Deadline didn't work in other machines than submitter
This commit is contained in:
Petr Kalis 2022-02-18 12:39:46 +01:00 committed by GitHub
commit 8dc75c68cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -320,7 +320,6 @@ class HarmonySubmitDeadline(
/ published_scene.stem
/ f"{published_scene.stem}.xstage"
)
unzip_dir = (published_scene.parent / published_scene.stem)
with _ZipFile(published_scene, "r") as zip_ref:
zip_ref.extractall(unzip_dir.as_posix())
@ -351,12 +350,9 @@ class HarmonySubmitDeadline(
# use that one.
if not ideal_scene:
xstage_path = xstage_files[0]
return xstage_path
def get_plugin_info(self):
work_scene = Path(self._instance.data["source"])
# this is path to published scene workfile _ZIP_. Before
# rendering, we need to unzip it.
published_scene = Path(
@ -368,14 +364,13 @@ class HarmonySubmitDeadline(
# for submit_publish job to create .json file in
self._instance.data["outputDir"] = render_path
new_expected_files = []
work_path_str = str(work_scene.parent.as_posix())
render_path_str = str(render_path.as_posix())
for file in self._instance.data["expectedFiles"]:
_file = str(Path(file).as_posix())
expected_dir_str = os.path.dirname(_file)
new_expected_files.append(
_file.replace(work_path_str, render_path_str)
_file.replace(expected_dir_str, render_path_str)
)
audio_file = self._instance.data.get("audioFile")
if audio_file:
abs_path = xstage_path.parent / audio_file