Submitting render job to RoyalRender.
CreateMayaCacheRoyalRenderJob
Bases: BaseCreateRoyalRenderJob
Source code in client/ayon_royalrender/plugins/publish/create_maya_cache_royalrender_job.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51 | class CreateMayaCacheRoyalRenderJob(lib.BaseCreateRoyalRenderJob):
label = "Create Maya Cache job in RR"
hosts = ["maya"]
families = ["pointcache"]
targets = ["local"]
def update_job_with_host_specific(self, instance, job):
job.Software = "Maya"
job.Renderer = "RemotePublish"
job.Version = "{0:.2f}".format(MGlobal.apiVersion() / 10000)
job.CustomScriptFile = "<rrLocalRenderScripts>/ayon_remote_publish.py"
workspace = instance.context.data["workspaceDir"]
job.SceneDatabaseDir = workspace
job.rrEnvList += f"~~~INSTANCE_IDS={instance.data['instance_id']}"
return job
def process(self, instance):
"""Plugin entry point."""
if not instance.data.get("farm"):
self.log.info("Skipping local instance.")
return
super().process(instance)
# append full path
renders_dir = os.path.join(
cmds.workspace(query=True, rootDirectory=True),
cmds.workspace(fileRuleEntry="images")
)
job = self.get_job(
instance,
self.scene_path,
renders_dir,
"",
job_type="REMOTE"
)
job = self.update_job_with_host_specific(instance, job)
instance.data["rrJobs"].append(job)
|
process(instance)
Plugin entry point.
Source code in client/ayon_royalrender/plugins/publish/create_maya_cache_royalrender_job.py
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51 | def process(self, instance):
"""Plugin entry point."""
if not instance.data.get("farm"):
self.log.info("Skipping local instance.")
return
super().process(instance)
# append full path
renders_dir = os.path.join(
cmds.workspace(query=True, rootDirectory=True),
cmds.workspace(fileRuleEntry="images")
)
job = self.get_job(
instance,
self.scene_path,
renders_dir,
"",
job_type="REMOTE"
)
job = self.update_job_with_host_specific(instance, job)
instance.data["rrJobs"].append(job)
|