mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 21:32:15 +01:00
Merge pull request #2700 from pypeclub/enhancement/royalrender-minor-enhancements
RoyalRender: Minor enhancements
This commit is contained in:
commit
e721b543ce
14 changed files with 76 additions and 5 deletions
2
.gitmodules
vendored
2
.gitmodules
vendored
|
|
@ -3,4 +3,4 @@
|
|||
url = https://github.com/pypeclub/avalon-core.git
|
||||
[submodule "repos/avalon-unreal-integration"]
|
||||
path = repos/avalon-unreal-integration
|
||||
url = https://github.com/pypeclub/avalon-unreal-integration.git
|
||||
url = https://github.com/pypeclub/avalon-unreal-integration.git
|
||||
|
|
@ -35,7 +35,7 @@ DEFAULT_OPENPYPE_MODULES = (
|
|||
"log_viewer",
|
||||
"deadline",
|
||||
"muster",
|
||||
"royal_render",
|
||||
"royalrender",
|
||||
"python_console_interpreter",
|
||||
"ftrack",
|
||||
"slack",
|
||||
|
|
|
|||
|
|
@ -77,8 +77,19 @@ class CollectSequencesFromJob(pyblish.api.ContextPlugin):
|
|||
order = pyblish.api.CollectorOrder
|
||||
targets = ["rr_control"]
|
||||
label = "Collect Rendered Frames"
|
||||
review = True
|
||||
|
||||
def process(self, context):
|
||||
|
||||
self.review = (
|
||||
context.data
|
||||
["project_settings"]
|
||||
["royalrender"]
|
||||
["publish"]
|
||||
["CollectSequencesFromJob"]
|
||||
["review"]
|
||||
)
|
||||
|
||||
if os.environ.get("OPENPYPE_PUBLISH_DATA"):
|
||||
self.log.debug(os.environ.get("OPENPYPE_PUBLISH_DATA"))
|
||||
paths = os.environ["OPENPYPE_PUBLISH_DATA"].split(os.pathsep)
|
||||
|
|
@ -150,7 +161,8 @@ class CollectSequencesFromJob(pyblish.api.ContextPlugin):
|
|||
families.append("render")
|
||||
if "ftrack" not in families:
|
||||
families.append("ftrack")
|
||||
if "review" not in families:
|
||||
if "review" not in families and self.review:
|
||||
self.log.info("attaching review")
|
||||
families.append("review")
|
||||
|
||||
for collection in collections:
|
||||
|
|
@ -20,7 +20,7 @@ class OpenPypeContextSelector:
|
|||
|
||||
def __init__(self):
|
||||
self.job = rr.getJob()
|
||||
self.context = None
|
||||
self.context = {}
|
||||
|
||||
self.openpype_executable = "openpype_gui"
|
||||
if platform.system().lower() == "windows":
|
||||
|
|
@ -136,7 +136,7 @@ class OpenPypeContextSelector:
|
|||
|
||||
def run_publish(self):
|
||||
"""Run publish process."""
|
||||
env = {'AVALON_PROJECT': str(self.context.get("project")),
|
||||
env = {"AVALON_PROJECT": str(self.context.get("project")),
|
||||
"AVALON_ASSET": str(self.context.get("asset")),
|
||||
"AVALON_TASK": str(self.context.get("task")),
|
||||
"AVALON_APP_NAME": str(self.context.get("app_name"))}
|
||||
|
|
@ -179,4 +179,18 @@ class OpenPypeContextSelector:
|
|||
|
||||
print("running selector")
|
||||
selector = OpenPypeContextSelector()
|
||||
|
||||
# try to set context from environment
|
||||
selector.context["project"] = os.getenv("AVALON_PROJECT")
|
||||
selector.context["asset"] = os.getenv("AVALON_ASSET")
|
||||
selector.context["task"] = os.getenv("AVALON_TASK")
|
||||
selector.context["app_name"] = os.getenv("AVALON_APP_NAME")
|
||||
|
||||
# if anything inside is None, scratch the whole thing and
|
||||
# ask user for context.
|
||||
for _, v in selector.context.items():
|
||||
if not v:
|
||||
selector.context = {}
|
||||
break
|
||||
|
||||
selector.process_job()
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"publish": {
|
||||
"CollectSequencesFromJob": {
|
||||
"review": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -66,6 +66,10 @@
|
|||
"type": "schema",
|
||||
"name": "schema_project_deadline"
|
||||
},
|
||||
{
|
||||
"type": "schema",
|
||||
"name": "schema_project_royalrender"
|
||||
},
|
||||
{
|
||||
"type": "schema",
|
||||
"name": "schema_project_slack"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
"type": "dict",
|
||||
"key": "royalrender",
|
||||
"label": "Royal Render",
|
||||
"collapsible": true,
|
||||
"is_file": true,
|
||||
"children": [
|
||||
{
|
||||
"type": "dict",
|
||||
"collapsible": true,
|
||||
"key": "publish",
|
||||
"label": "Publish plugins",
|
||||
"children": [
|
||||
{
|
||||
"type": "label",
|
||||
"label": "Collectors"
|
||||
},
|
||||
{
|
||||
"type": "dict",
|
||||
"collapsible": true,
|
||||
"key": "CollectSequencesFromJob",
|
||||
"label": "Collect Sequences from the Job",
|
||||
"children": [
|
||||
{
|
||||
"type": "boolean",
|
||||
"key": "review",
|
||||
"label": "Generate reviews from sequences"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue