Merge pull request #361 from tokejepsen/2.x/bugfix/nuke_deadline_script_path

Use published workfile for rendering.
This commit is contained in:
Milan Kolar 2020-07-20 16:51:45 +02:00 committed by GitHub
commit 916e7d03ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -49,6 +49,24 @@ class NukeSubmitDeadline(pyblish.api.InstancePlugin):
render_path = instance.data['path']
script_path = context.data["currentFile"]
for item in context:
if "workfile" in item.data["families"]:
msg = "Workfile (scene) must be published along"
assert item.data["publish"] is True, msg
template_data = item.data.get("anatomyData")
rep = item.data.get("representations")[0].get("name")
template_data["representation"] = rep
template_data["ext"] = rep
template_data["comment"] = None
anatomy_filled = context.data["anatomy"].format(template_data)
template_filled = anatomy_filled["publish"]["path"]
script_path = os.path.normpath(template_filled)
self.log.info(
"Using published scene for render {}".format(script_path)
)
# exception for slate workflow
if "slate" in instance.data["families"]:
self._frame_start -= 1