mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 13:24:54 +01:00
Merge pull request #2842 from pypeclub/bugfix/OP-2803_nuke-farm-publishing-with-multiple-bake-profiles
This commit is contained in:
commit
2e5ce4f0bf
4 changed files with 26 additions and 29 deletions
|
|
@ -152,6 +152,7 @@ class ExporterReview(object):
|
|||
|
||||
"""
|
||||
data = None
|
||||
publish_on_farm = False
|
||||
|
||||
def __init__(self,
|
||||
klass,
|
||||
|
|
@ -210,6 +211,9 @@ class ExporterReview(object):
|
|||
if self.multiple_presets:
|
||||
repre["outputName"] = self.name
|
||||
|
||||
if self.publish_on_farm:
|
||||
repre["tags"].append("publish_on_farm")
|
||||
|
||||
self.data["representations"].append(repre)
|
||||
|
||||
def get_view_input_process_node(self):
|
||||
|
|
@ -446,6 +450,7 @@ class ExporterReviewMov(ExporterReview):
|
|||
return path
|
||||
|
||||
def generate_mov(self, farm=False, **kwargs):
|
||||
self.publish_on_farm = farm
|
||||
reformat_node_add = kwargs["reformat_node_add"]
|
||||
reformat_node_config = kwargs["reformat_node_config"]
|
||||
bake_viewer_process = kwargs["bake_viewer_process"]
|
||||
|
|
@ -563,7 +568,7 @@ class ExporterReviewMov(ExporterReview):
|
|||
# ---------- end nodes creation
|
||||
|
||||
# ---------- render or save to nk
|
||||
if farm:
|
||||
if self.publish_on_farm:
|
||||
nuke.scriptSave()
|
||||
path_nk = self.save_file()
|
||||
self.data.update({
|
||||
|
|
@ -573,11 +578,12 @@ class ExporterReviewMov(ExporterReview):
|
|||
})
|
||||
else:
|
||||
self.render(write_node.name())
|
||||
# ---------- generate representation data
|
||||
self.get_representation_data(
|
||||
tags=["review", "delete"] + add_tags,
|
||||
range=True
|
||||
)
|
||||
|
||||
# ---------- generate representation data
|
||||
self.get_representation_data(
|
||||
tags=["review", "delete"] + add_tags,
|
||||
range=True
|
||||
)
|
||||
|
||||
self.log.debug("Representation... `{}`".format(self.data))
|
||||
|
||||
|
|
|
|||
|
|
@ -130,9 +130,11 @@ class ExtractReviewDataMov(openpype.api.Extractor):
|
|||
})
|
||||
else:
|
||||
data = exporter.generate_mov(**o_data)
|
||||
generated_repres.extend(data["representations"])
|
||||
|
||||
self.log.info(generated_repres)
|
||||
# add representation generated by exporter
|
||||
generated_repres.extend(data["representations"])
|
||||
self.log.debug(
|
||||
"__ generated_repres: {}".format(generated_repres))
|
||||
|
||||
if generated_repres:
|
||||
# assign to representations
|
||||
|
|
|
|||
|
|
@ -516,7 +516,6 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin):
|
|||
"""
|
||||
representations = []
|
||||
collections, remainders = clique.assemble(exp_files)
|
||||
bake_renders = instance.get("bakingNukeScripts", [])
|
||||
|
||||
# create representation for every collected sequento ce
|
||||
for collection in collections:
|
||||
|
|
@ -534,9 +533,6 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin):
|
|||
preview = True
|
||||
break
|
||||
|
||||
if bake_renders:
|
||||
preview = False
|
||||
|
||||
# toggle preview on if multipart is on
|
||||
if instance.get("multipartExr", False):
|
||||
preview = True
|
||||
|
|
@ -610,16 +606,6 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin):
|
|||
})
|
||||
self._solve_families(instance, True)
|
||||
|
||||
if (bake_renders
|
||||
and remainder in bake_renders[0]["bakeRenderPath"]):
|
||||
rep.update({
|
||||
"fps": instance.get("fps"),
|
||||
"tags": ["review", "delete"]
|
||||
})
|
||||
# solve families with `preview` attributes
|
||||
self._solve_families(instance, True)
|
||||
representations.append(rep)
|
||||
|
||||
return representations
|
||||
|
||||
def _solve_families(self, instance, preview=False):
|
||||
|
|
|
|||
|
|
@ -107,6 +107,10 @@ class ValidateExpectedFiles(pyblish.api.InstancePlugin):
|
|||
explicitly and manually changed the frame list on the Deadline job.
|
||||
|
||||
"""
|
||||
# no frames in file name at all, eg 'renderCompositingMain.withLut.mov'
|
||||
if not frame_placeholder:
|
||||
return set([file_name_template])
|
||||
|
||||
real_expected_rendered = set()
|
||||
src_padding_exp = "%0{}d".format(len(frame_placeholder))
|
||||
for frames in frame_list:
|
||||
|
|
@ -130,14 +134,13 @@ class ValidateExpectedFiles(pyblish.api.InstancePlugin):
|
|||
|
||||
# There might be cases where clique was unable to collect
|
||||
# collections in `collect_frames` - thus we capture that case
|
||||
if frame is None:
|
||||
self.log.warning("Unable to detect frame from filename: "
|
||||
"{}".format(file_name))
|
||||
continue
|
||||
if frame is not None:
|
||||
frame_placeholder = "#" * len(frame)
|
||||
|
||||
frame_placeholder = "#" * len(frame)
|
||||
file_name_template = os.path.basename(
|
||||
file_name.replace(frame, frame_placeholder))
|
||||
file_name_template = os.path.basename(
|
||||
file_name.replace(frame, frame_placeholder))
|
||||
else:
|
||||
file_name_template = file_name
|
||||
break
|
||||
|
||||
return file_name_template, frame_placeholder
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue