Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Royal Render: Maya and Nuke support #5191

Merged
merged 124 commits into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from 114 commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
450c027
:construction: wip on maya royalrender submit plugin
antirotor Oct 26, 2022
635fe48
:recycle: move functions to common lib
antirotor Oct 26, 2022
3c026c3
:twisted_rightwards_arrows: Merge remote-tracking branch 'origin/deve…
antirotor Jan 11, 2023
aaafcd6
:construction: redoing publishing flow for multiple rr roots
antirotor Jan 11, 2023
0eb7da3
:recycle: optimizing enum classes
antirotor Jan 11, 2023
2cc688f
:construction: render job submission
antirotor Jan 16, 2023
b3b2667
:construction: refactor RR job flow
antirotor Jan 18, 2023
60eaf28
:bug: fix default for ShotGrid
antirotor Jan 18, 2023
b4f1574
:rotating_light: hound fixes
antirotor Jan 18, 2023
56f404e
:rotating_light: hound fixes 2
antirotor Jan 18, 2023
e079549
Merge branch 'develop' into feature/OP-3933_RR-support
antirotor Feb 6, 2023
ba1bb56
Merge remote-tracking branch 'origin/develop' into feature/OP-3933_RR…
antirotor Feb 6, 2023
61fe2ac
:construction: work on publish job
antirotor Feb 7, 2023
085d803
:construction: wip on maya royalrender submit plugin
antirotor Oct 26, 2022
77315d3
:recycle: move functions to common lib
antirotor Oct 26, 2022
ca552a7
:construction: redoing publishing flow for multiple rr roots
antirotor Jan 11, 2023
7e4b3cb
:recycle: optimizing enum classes
antirotor Jan 11, 2023
7d212c0
:construction: render job submission
antirotor Jan 16, 2023
7ab4e0f
:construction: refactor RR job flow
antirotor Jan 18, 2023
e49cbf3
:bug: fix default for ShotGrid
antirotor Jan 18, 2023
8ebef52
:rotating_light: hound fixes
antirotor Jan 18, 2023
5dda835
:rotating_light: hound fixes 2
antirotor Jan 18, 2023
cc8732a
:construction: work on publish job
antirotor Feb 7, 2023
5595712
:art: add cmd line arguments attribute to job
antirotor Mar 23, 2023
076e5c4
Merge remote-tracking branch 'origin/feature/OP-3933_RR-support' into…
antirotor Mar 23, 2023
4e14e0b
:art: add render configuration
antirotor Mar 24, 2023
f328c98
:heavy_minus_sign: remove old plugin
antirotor Mar 24, 2023
de5bca4
:art: add openpype version
antirotor Mar 24, 2023
226039f
:recycle: handling of jobs
antirotor Mar 24, 2023
03b3d2f
:art: better publish job render config
antirotor Mar 24, 2023
09876a6
Merge branch 'develop' into feature/OP-3933_RR-support
antirotor Mar 29, 2023
8adb053
:recycle: handle OP versions better
antirotor Mar 29, 2023
79a9deb
Merge remote-tracking branch 'origin/develop' into feature/OP-3933_RR…
antirotor Apr 13, 2023
547fe50
:rotating_light: fix hound :dog:
antirotor Apr 13, 2023
23f90ec
:construction: wip on skeleton instance
antirotor Apr 17, 2023
c9b6179
:construction: move common code out from deadline
antirotor Apr 21, 2023
7f588ee
:heavy_plus_sign: add mypy
antirotor Apr 21, 2023
2e2aaae
Merge remote-tracking branch 'origin/develop' into feature/OP-3933_RR…
antirotor Apr 28, 2023
3a91094
:art: update code from upstream
antirotor Apr 28, 2023
92bb47e
:art: add nuke job creator
antirotor Apr 28, 2023
1f0572a
:recycle: refactor deadline code to make use of abstracted code
antirotor Apr 28, 2023
806b925
Fix wrong family
kalisp May 3, 2023
ddab924
Extract iter_expected_files
kalisp May 3, 2023
7fe4820
Renamed file
kalisp May 3, 2023
266d34b
Fix querying anatomy
kalisp May 3, 2023
7913276
Fix typo, wrong parentheses
kalisp May 3, 2023
87eb1ed
Fix wrong method
kalisp May 3, 2023
c284908
Fix attr.s for Python2
kalisp May 3, 2023
1b4f452
Extracted prepare_representations
kalisp May 3, 2023
fb06a2e
Extracted create_metadata_path
kalisp May 4, 2023
dded3e1
Added missing variables
kalisp May 4, 2023
3bbab45
Removed usage of legacy_io
kalisp May 4, 2023
9a95fac
Changed to use os env OPENPYPE_VERSION
kalisp May 4, 2023
cace4f2
Used correct function
kalisp May 4, 2023
b18e6ad
Proper serialization
kalisp May 4, 2023
050c11e
Fix adding
kalisp May 4, 2023
c8451d1
Fix copy
kalisp May 4, 2023
ac02eac
Small fixes
kalisp May 4, 2023
4e455ea
Instance data might not contain "publish" key
kalisp May 5, 2023
8858c0c
Get proper rrPathName
kalisp May 5, 2023
d8e8e10
Remove unwanted logging code
kalisp May 9, 2023
45894da
Fix frame placeholder
kalisp May 9, 2023
97043fe
Use absolute path instead of rootless
kalisp May 9, 2023
07139db
Implemented waiting on job id
kalisp May 10, 2023
ddf0b3b
Added RequiredMemory
kalisp May 10, 2023
449157f
Fix executable placeholder
kalisp May 10, 2023
edcc1cc
Fix content of metadata file
kalisp May 10, 2023
0ad2e21
Add logging to log file
kalisp May 10, 2023
a10bf73
Fix batching of publish job
kalisp May 10, 2023
0a6fd30
Remove unneeded import
kalisp May 10, 2023
b001266
Clean up
kalisp May 10, 2023
540981d
Clean up
kalisp May 10, 2023
ddb227b
Remove unfinished file
kalisp May 10, 2023
f3ce4c6
Hound
kalisp May 10, 2023
36ef2b5
Hound
kalisp May 10, 2023
fe08d8d
Merge branch 'develop' into feature/OP-3933_RR-support
kalisp May 10, 2023
b654b10
Handle conflict with recent develop
kalisp May 11, 2023
c302b61
Removed _extend_frames
kalisp May 11, 2023
1aef4c5
Fix missing import
kalisp May 11, 2023
78f9a68
Fix aov handling
kalisp May 11, 2023
a4434d9
Fix adding review to families
kalisp May 11, 2023
d745ebc
Fix missing colorspaceTemplate key
kalisp May 11, 2023
162b58c
Fix access to anatomy
kalisp May 11, 2023
ad488c7
Fix use proper families
kalisp May 11, 2023
c1f3201
Fix use proper subset name
kalisp May 11, 2023
6df0fbc
OP-1066 - fix changed imports
kalisp May 12, 2023
2c3cd1c
OP-1066 - renamed file
kalisp May 12, 2023
86a1357
OP-1066 - sanitize version
kalisp May 12, 2023
226b088
Merge branch 'develop' into feature/OP-3933_RR-support
antirotor May 16, 2023
56f2edf
Add prerender family to collector for RR path
kalisp May 17, 2023
c83bc48
Merge remote-tracking branch 'origin/feature/OP-3933_RR-support' into…
kalisp May 18, 2023
f6118ed
Added docuumentation
kalisp May 18, 2023
81cca7f
Merge develop
kalisp May 30, 2023
694cec5
Merge remote-tracking branch 'origin/develop' into feature/OP-3933_RR…
antirotor Jun 5, 2023
d7fd9c8
:recycle: non-optional access to rep data
antirotor Jun 5, 2023
7053688
:bug: fix rendering from published file in Deadline
antirotor Jun 7, 2023
2851b32
:bug: fix collections
antirotor Jun 7, 2023
01b5e6b
OP-6037 - extracted generic logic from working Nuke implementation
kalisp Jun 9, 2023
644b734
OP-6037 - first iteration of Maya to RR
kalisp Jun 9, 2023
9cb1216
Resolved conflict
kalisp Jun 14, 2023
23c4a1d
Merge branch 'maya_new_publisher' of github.com:BigRoy/OpenPype into …
kalisp Jun 26, 2023
c83589b
Merge maya_new_publisher
kalisp Jun 26, 2023
6619be9
Fix append job
kalisp Jun 27, 2023
d6b0b9c
Remove outputDir
kalisp Jun 27, 2023
d0e1d5c
Fix cleanup of camera info
kalisp Jun 27, 2023
ec54515
Fix - correct resolution of published workile path
kalisp Jun 28, 2023
0df104b
Fix - proper padding of file name
kalisp Jun 28, 2023
4a672c5
Hound
kalisp Jun 28, 2023
307580f
Merge branch 'develop' into maye_new_publisher_with_RR
kalisp Jun 28, 2023
b24db55
Merge remote-tracking branch 'BigRoy/maya_new_publisher' into maye_ne…
kalisp Jul 3, 2023
a2cd44d
Merge branch 'maye_new_publisher_with_RR' of github.com:ynput/OpenPyp…
kalisp Jul 3, 2023
b9e362d
Fix - Nuke needs to have multiple jobs
kalisp Jul 3, 2023
614d600
Refactor - removed unnecessary variable
kalisp Jul 4, 2023
8754345
Fix - Nuke needs to have multiple jobs got accidentally reverted
kalisp Jul 4, 2023
708819f
Refactor - renamed replace_published_scene
Jul 5, 2023
26cd4f0
Hound
Jul 5, 2023
0134134
Merge branch 'develop' into maye_new_publisher_with_RR
kalisp Jul 10, 2023
892758b
Added missed colorspace injection for image sequences
kalisp Jul 12, 2023
681ff3a
Merge remote-tracking branch 'origin/maye_new_publisher_with_RR' into…
kalisp Jul 12, 2023
48f06ba
Fix - removed wrong argument
kalisp Jul 12, 2023
abc6a1e
Fix - context must be passe to set_representation_colorspace
kalisp Jul 12, 2023
7939836
Merge branch 'develop' into maye_new_publisher_with_RR
kalisp Jul 17, 2023
2be5b33
Fix wrong merge
kalisp Jul 17, 2023
b90d1c9
Fix wrong merge
kalisp Jul 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions openpype/hosts/maya/api/fbx.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""Tools to work with FBX."""
import logging

from pyblish.api import Instance
import pyblish.api

from maya import cmds # noqa
import maya.mel as mel # noqa
Expand Down Expand Up @@ -141,7 +141,7 @@ def parse_overrides(self, instance, options):
return options

def set_options_from_instance(self, instance):
# type: (Instance) -> None
# type: (pyblish.api.Instance) -> None
"""Sets FBX export options from data in the instance.

Args:
Expand Down
7 changes: 7 additions & 0 deletions openpype/hosts/maya/plugins/publish/collect_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,13 @@ def process(self, instance):
"colorspaceView": colorspace_data["view"],
}

rr_settings = (
context.data["system_settings"]["modules"]["royalrender"]
)
if rr_settings["enabled"]:
data["rrPathName"] = instance.data.get("rrPathName")
self.log.info(data["rrPathName"])

if self.sync_workfile_version:
data["version"] = context.data["version"]
for instance in context:
Expand Down
91 changes: 5 additions & 86 deletions openpype/modules/deadline/abstract_submit_deadline.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
KnownPublishError,
OpenPypePyblishPluginMixin
)
from openpype.pipeline.publish.lib import (
replace_published_scene
)

JSONDecodeError = getattr(json.decoder, "JSONDecodeError", ValueError)

Expand Down Expand Up @@ -430,7 +433,7 @@ def process(self, instance):
file_path = None
if self.use_published:
if not self.import_reference:
file_path = self.from_published_scene()
file_path = self.from_published_scene(context)
else:
self.log.info("use the scene with imported reference for rendering") # noqa
file_path = context.data["currentFile"]
Expand Down Expand Up @@ -525,72 +528,7 @@ def from_published_scene(self, replace_in_path=True):
published.

"""
instance = self._instance
workfile_instance = self._get_workfile_instance(instance.context)
if workfile_instance is None:
return

# determine published path from Anatomy.
template_data = workfile_instance.data.get("anatomyData")
rep = workfile_instance.data["representations"][0]
template_data["representation"] = rep.get("name")
template_data["ext"] = rep.get("ext")
template_data["comment"] = None

anatomy = instance.context.data['anatomy']
template_obj = anatomy.templates_obj["publish"]["path"]
template_filled = template_obj.format_strict(template_data)
file_path = os.path.normpath(template_filled)

self.log.info("Using published scene for render {}".format(file_path))

if not os.path.exists(file_path):
self.log.error("published scene does not exist!")
raise

if not replace_in_path:
return file_path

# now we need to switch scene in expected files
# because <scene> token will now point to published
# scene file and that might differ from current one
def _clean_name(path):
return os.path.splitext(os.path.basename(path))[0]

new_scene = _clean_name(file_path)
orig_scene = _clean_name(instance.context.data["currentFile"])
expected_files = instance.data.get("expectedFiles")

if isinstance(expected_files[0], dict):
# we have aovs and we need to iterate over them
new_exp = {}
for aov, files in expected_files[0].items():
replaced_files = []
for f in files:
replaced_files.append(
str(f).replace(orig_scene, new_scene)
)
new_exp[aov] = replaced_files
# [] might be too much here, TODO
instance.data["expectedFiles"] = [new_exp]
else:
new_exp = []
for f in expected_files:
new_exp.append(
str(f).replace(orig_scene, new_scene)
)
instance.data["expectedFiles"] = new_exp

metadata_folder = instance.data.get("publishRenderMetadataFolder")
if metadata_folder:
metadata_folder = metadata_folder.replace(orig_scene,
new_scene)
instance.data["publishRenderMetadataFolder"] = metadata_folder
self.log.info("Scene name was switched {} -> {}".format(
orig_scene, new_scene
))

return file_path
return replace_published_scene(self._instance, replace_in_path=True)

def assemble_payload(
self, job_info=None, plugin_info=None, aux_files=None):
Expand Down Expand Up @@ -651,22 +589,3 @@ def submit(self, payload):
self._instance.data["deadlineSubmissionJob"] = result

return result["_id"]

@staticmethod
def _get_workfile_instance(context):
"""Find workfile instance in context"""
for instance in context:

is_workfile = (
"workfile" in instance.data.get("families", []) or
instance.data["family"] == "workfile"
)
if not is_workfile:
continue

# test if there is instance of workfile waiting
# to be published.
assert instance.data.get("publish", True) is True, (
"Workfile (scene) must be published along")

return instance
16 changes: 3 additions & 13 deletions openpype/modules/deadline/plugins/publish/submit_maya_deadline.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
from openpype_modules.deadline.abstract_submit_deadline import DeadlineJobInfo
from openpype.tests.lib import is_in_tests
from openpype.lib import is_running_from_build
from openpype.pipeline.farm.tools import iter_expected_files


def _validate_deadline_bool_value(instance, attribute, value):
Expand Down Expand Up @@ -238,7 +239,7 @@ def get_job_info(self):
# Add list of expected files to job
# ---------------------------------
exp = instance.data.get("expectedFiles")
for filepath in self._iter_expected_files(exp):
for filepath in iter_expected_files(exp):
job_info.OutputDirectory += os.path.dirname(filepath)
job_info.OutputFilename += os.path.basename(filepath)

Expand Down Expand Up @@ -296,7 +297,7 @@ def process_submission(self):
# TODO: Avoid the need for this logic here, needed for submit publish
# Store output dir for unified publisher (filesequence)
expected_files = instance.data["expectedFiles"]
first_file = next(self._iter_expected_files(expected_files))
first_file = next(iter_expected_files(expected_files))
output_dir = os.path.dirname(first_file)
instance.data["outputDir"] = output_dir
instance.data["toBeRenderedOn"] = "deadline"
Expand Down Expand Up @@ -815,16 +816,6 @@ def _job_info_label(self, label):
end=int(self._instance.data["frameEndHandle"]),
)

@staticmethod
def _iter_expected_files(exp):
if isinstance(exp[0], dict):
for _aov, files in exp[0].items():
for file in files:
yield file
else:
for file in exp:
yield file

@classmethod
def get_attribute_defs(cls):
defs = super(MayaSubmitDeadline, cls).get_attribute_defs()
Expand Down Expand Up @@ -863,7 +854,6 @@ def get_attribute_defs(cls):

return defs


def _format_tiles(
filename,
index,
Expand Down
Loading