mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
Merge remote-tracking branch 'origin/feature/render-plugins-abstraction' into feature/698-after-effects-publish-to-deadline
This commit is contained in:
commit
b010aced99
2 changed files with 9 additions and 25 deletions
|
|
@ -124,6 +124,8 @@ class AbstractCollectRender(pyblish.api.ContextPlugin):
|
|||
try:
|
||||
if "workfile" in instance.data["families"]:
|
||||
instance.data["publish"] = True
|
||||
if "renderFarm" in instance.data["families"]:
|
||||
instance.data["remove"] = True
|
||||
except KeyError:
|
||||
# be tolerant if 'families' is missing.
|
||||
pass
|
||||
|
|
@ -165,13 +167,6 @@ class AbstractCollectRender(pyblish.api.ContextPlugin):
|
|||
frame_end_handle = frame_end_render
|
||||
|
||||
data = {
|
||||
"subset": render_instance.subset,
|
||||
"attachTo": render_instance.attachTo,
|
||||
"setMembers": render_instance.setMembers,
|
||||
"multipartExr": render_instance.multipartExr,
|
||||
"review": render_instance.review or False,
|
||||
"publish": True,
|
||||
|
||||
"handleStart": handle_start,
|
||||
"handleEnd": handle_end,
|
||||
"frameStart": frame_start,
|
||||
|
|
@ -179,34 +174,22 @@ class AbstractCollectRender(pyblish.api.ContextPlugin):
|
|||
"frameStartHandle": frame_start_handle,
|
||||
"frameEndHandle": frame_end_handle,
|
||||
"byFrameStep": int(render_instance.frameStep),
|
||||
"renderer": render_instance.renderer,
|
||||
# instance subset
|
||||
"family": render_instance.family,
|
||||
"families": render_instance.families,
|
||||
"asset": render_instance.asset,
|
||||
"time": render_instance.time,
|
||||
|
||||
"author": context.data["user"],
|
||||
# Add source to allow tracing back to the scene from
|
||||
# which was submitted originally
|
||||
"source": render_instance.source,
|
||||
"expectedFiles": exp_files,
|
||||
"resolutionWidth": render_instance.resolutionWidth,
|
||||
"resolutionHeight": render_instance.resolutionHeight,
|
||||
"pixelAspect": render_instance.pixelAspect,
|
||||
"tileRendering": render_instance.tileRendering or False,
|
||||
"tilesX": render_instance.tilesX or 2,
|
||||
"tilesY": render_instance.tilesY or 2,
|
||||
"priority": render_instance.priority,
|
||||
"convertToScanline": render_instance.convertToScanline or False
|
||||
}
|
||||
if self.sync_workfile_version:
|
||||
data["version"] = context.data["version"]
|
||||
|
||||
# add additional data
|
||||
data = self.add_additional_data(data)
|
||||
render_instance_dict = attr.asdict(render_instance)
|
||||
|
||||
instance = context.create_instance(render_instance.name)
|
||||
instance.data["label"] = render_instance.label
|
||||
instance.data.update(render_instance_dict)
|
||||
instance.data.update(data)
|
||||
|
||||
self.post_collecting_action()
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ from .abstract_metaplugins import AbstractMetaInstancePlugin
|
|||
|
||||
|
||||
@attr.s
|
||||
class DeadlineJobInfo:
|
||||
class DeadlineJobInfo(object):
|
||||
"""Mapping of all Deadline *JobInfo* attributes.
|
||||
|
||||
This contains all JobInfo attributes plus their default values.
|
||||
|
|
@ -474,14 +474,15 @@ class AbstractSubmitDeadline(pyblish.api.InstancePlugin):
|
|||
anatomy = self._instance.context.data['anatomy']
|
||||
file_path = None
|
||||
for i in self._instance.context:
|
||||
if "workfile" in i.data["families"]:
|
||||
if "workfile" in i.data["families"] \
|
||||
or i.data["family"] == "workfile":
|
||||
# test if there is instance of workfile waiting
|
||||
# to be published.
|
||||
assert i.data["publish"] is True, (
|
||||
"Workfile (scene) must be published along")
|
||||
# determine published path from Anatomy.
|
||||
template_data = i.data.get("anatomyData")
|
||||
rep = i.data.get("representations")[0].get("name")
|
||||
rep = i.data.get("representations")[0].get("ext")
|
||||
template_data["representation"] = rep
|
||||
template_data["ext"] = rep
|
||||
template_data["comment"] = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue