DL - rebrand to OpenPype

This commit is contained in:
Petr Kalis 2021-04-01 16:59:39 +02:00
parent c2554b241e
commit 8fab40ad0c
16 changed files with 56 additions and 55 deletions

View file

@ -252,7 +252,7 @@ class MayaSubmitDeadline(pyblish.api.InstancePlugin):
families = ["renderlayer"]
use_published = True
tile_assembler_plugin = "PypeTileAssembler"
tile_assembler_plugin = "OpenPypeTileAssembler"
asset_dependencies = False
limit_groups = []
group = "none"

@ -1 +1 @@
Subproject commit de4312416704102a3587802d7a042e75efb99d49
Subproject commit 3611474e573f6239d22d74834e3fa90a7613ec94

View file

@ -27,9 +27,9 @@ Items=DEBUG;INFO;WARNING;ERROR
Default=DEBUG
Description=Logging level where printing will start.
[PypeExecutable]
[OpenPypeExecutable]
Type=MultiLineMultiFolder
Label=Path to Pype executable dir
Label=Path to OpenPype executable dir
Category=Job Plugins
CategoryOrder=1
CategoryIndex=1

View file

@ -3,16 +3,16 @@ import Deadline.Scripting
def GetDeadlineEventListener():
return PypeEventListener()
return OpenPypeEventListener()
def CleanupDeadlineEventListener(eventListener):
eventListener.Cleanup()
class PypeEventListener(Deadline.Events.DeadlineEventListener):
class OpenPypeEventListener(Deadline.Events.DeadlineEventListener):
"""
Called on every Deadline plugin event, used for injecting Pype
Called on every Deadline plugin event, used for injecting OpenPype
environment variables into rendering process.
Expects that job already contains env vars:
@ -20,10 +20,10 @@ class PypeEventListener(Deadline.Events.DeadlineEventListener):
AVALON_ASSET
AVALON_TASK
AVALON_APP_NAME
Without these only global environment would be pulled from Pype
Without these only global environment would be pulled from OpenPype
Configure 'Path to Pype executable dir' in Deadlines
'Tools > Configure Events > pype '
Configure 'Path to OpenPype executable dir' in Deadlines
'Tools > Configure Events > openpype '
Only directory path is needed.
"""
@ -85,16 +85,17 @@ class PypeEventListener(Deadline.Events.DeadlineEventListener):
del self.OnThermalShutdownCallback
del self.OnMachineRestartCallback
def set_pype_executable_path(self, job):
def set_openpype_executable_path(self, job):
"""
Sets configurable PypeExecutable value to job extra infos.
Sets configurable OpenPypeExecutable value to job extra infos.
GlobalJobPreLoad takes this value, pulls env vars for each task
from specific worker itself. GlobalJobPreLoad is not easily
configured, so we are configuring Event itself.
"""
pype_execs = self.GetConfigEntryWithDefault("PypeExecutable", "")
job.SetJobExtraInfoKeyValue("pype_executables", pype_execs)
openpype_execs = self.GetConfigEntryWithDefault("OpenPypeExecutable",
"")
job.SetJobExtraInfoKeyValue("openpype_executables", openpype_execs)
Deadline.Scripting.RepositoryUtils.SaveJob(job)
@ -105,12 +106,12 @@ class PypeEventListener(Deadline.Events.DeadlineEventListener):
def OnJobSubmitted(self, job):
# self.LogInfo("OnJobSubmitted LOGGING")
# for 1st time submit
self.set_pype_executable_path(job)
self.set_openpype_executable_path(job)
self.updateFtrackStatus(job, "Render Queued")
def OnJobStarted(self, job):
# self.LogInfo("OnJobStarted")
self.set_pype_executable_path(job)
self.set_openpype_executable_path(job)
self.updateFtrackStatus(job, "Rendering")
def OnJobFinished(self, job):
@ -119,7 +120,7 @@ class PypeEventListener(Deadline.Events.DeadlineEventListener):
def OnJobRequeued(self, job):
# self.LogInfo("OnJobRequeued LOGGING")
self.set_pype_executable_path(job)
self.set_openpype_executable_path(job)
def OnJobFailed(self, job):
pass
@ -130,7 +131,7 @@ class PypeEventListener(Deadline.Events.DeadlineEventListener):
def OnJobResumed(self, job):
# self.LogInfo("OnJobResumed LOGGING")
self.set_pype_executable_path(job)
self.set_openpype_executable_path(job)
self.updateFtrackStatus(job, "Rendering")
def OnJobPended(self, job):
@ -172,7 +173,7 @@ class PypeEventListener(Deadline.Events.DeadlineEventListener):
def OnSlaveStartingJob(self, host_name, job):
# self.LogInfo("OnSlaveStartingJob LOGGING")
self.set_pype_executable_path(job)
self.set_openpype_executable_path(job)
def OnSlaveStalled(self, job):
pass

View file

@ -7,33 +7,33 @@ import json
from Deadline.Scripting import RepositoryUtils, FileUtils
def inject_pype_environment(deadlinePlugin):
def inject_openpype_environment(deadlinePlugin):
job = deadlinePlugin.GetJob()
job = RepositoryUtils.GetJob(job.JobId, True) # invalidates cache
pype_render_job = job.GetJobEnvironmentKeyValue('PYPE_RENDER_JOB') \
or '0'
pype_publish_job = job.GetJobEnvironmentKeyValue('PYPE_PUBLISH_JOB') \
or '0'
openpype_render_job = \
job.GetJobEnvironmentKeyValue('OPENPYPE_RENDER_JOB') or '0'
openpype_publish_job = \
job.GetJobEnvironmentKeyValue('OPENPYPE_PUBLISH_JOB') or '0'
if pype_publish_job == '1' and pype_render_job == '1':
if openpype_publish_job == '1' and openpype_render_job == '1':
raise RuntimeError("Misconfiguration. Job couldn't be both " +
"render and publish.")
if pype_publish_job == '1':
if openpype_publish_job == '1':
print("Publish job, skipping inject.")
return
elif pype_render_job == '0':
# not pype triggered job
elif openpype_render_job == '0':
# not openpype triggered job
return
print("inject_pype_environment start")
print("inject_openpype_environment start")
try:
exe_list = job.GetJobExtraInfoKeyValue("pype_executables")
pype_app = FileUtils.SearchFileList(exe_list)
if pype_app == "":
exe_list = job.GetJobExtraInfoKeyValue("openpype_executables")
openpype_app = FileUtils.SearchFileList(exe_list)
if openpype_app == "":
raise RuntimeError(
"Pype executable was not found " +
"OpenPype executable was not found " +
"in the semicolon separated list \"" + exe_list + "\". " +
"The path to the render executable can be configured " +
"from the Plugin Configuration in the Deadline Monitor.")
@ -45,7 +45,7 @@ def inject_pype_environment(deadlinePlugin):
print("export_url {}".format(export_url))
args = [
pype_app,
openpype_app,
'extractenvironments',
export_url
]
@ -79,14 +79,14 @@ def inject_pype_environment(deadlinePlugin):
os.remove(export_url)
print("inject_pype_environment end")
print("inject_openpype_environment end")
except Exception:
import traceback
print(traceback.format_exc())
print("inject_pype_environment failed")
print("inject_openpype_environment failed")
RepositoryUtils.FailJob(job)
raise
def __main__(deadlinePlugin):
inject_pype_environment(deadlinePlugin)
inject_openpype_environment(deadlinePlugin)

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

View file

@ -4,7 +4,7 @@ Label=About
Category=About Plugin
CategoryOrder=-1
Index=0
Default=Pype Plugin for Deadline
Default=OpenPype Plugin for Deadline
Description=Not configurable
[ConcurrentTasks]
@ -16,12 +16,12 @@ Index=0
Default=True
Description=Not configurable
[Pype_Executable_3_0]
[OpenPype_Executable_3_0]
Type=multilinemultifilename
Label=Pype 3.0 Executable
Category=Pype Executables
Label=OpenPype 3.0 Executable
Category=OpenPype Executables
CategoryOrder=0
Index=0
Default=
Description=The path to the Pype executable. Enter alternative paths on separate lines.
Description=The path to the OpenPype executable. Enter alternative paths on separate lines.

View file

@ -12,18 +12,18 @@ import re
# main DeadlinePlugin class.
######################################################################
def GetDeadlinePlugin():
return PypeDeadlinePlugin()
return OpenPypeDeadlinePlugin()
def CleanupDeadlinePlugin(deadlinePlugin):
deadlinePlugin.Cleanup()
class PypeDeadlinePlugin(DeadlinePlugin):
class OpenPypeDeadlinePlugin(DeadlinePlugin):
"""
Standalone plugin for publishing from Pype.
Standalone plugin for publishing from OpenPype.
Calls Pype executable 'pype_console' from first correctly found
Calls OpenPype executable 'openpype_console' from first correctly found
file based on plugin configuration. Uses 'publish' command and passes
path to metadata json file, which contains all needed information
for publish process.
@ -56,11 +56,11 @@ class PypeDeadlinePlugin(DeadlinePlugin):
version = self.GetPluginInfoEntry("Version")
exeList = self.GetConfigEntry(
"Pype_Executable_" + version.replace(".", "_"))
"OpenPype_Executable_" + version.replace(".", "_"))
exe = FileUtils.SearchFileList(exeList)
if exe == "":
self.FailRender(
"Pype " + version + " executable was not found " +
"OpenPype " + version + " executable was not found " +
"in the semicolon separated list \"" + exeList + "\". " +
"The path to the render executable can be configured " +
"from the Plugin Configuration in the Deadline Monitor.")

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

View file

@ -23,7 +23,7 @@ Index=0
Label=Cleanup Tiles
Required=false
DisableIfBlank=true
Description=If enabled, the Pype Tile Assembler will cleanup all tiles after assembly.
Description=If enabled, the OpenPype Tile Assembler will cleanup all tiles after assembly.
[Renderer]
Type=string

View file

@ -4,7 +4,7 @@ Label=About
Category=About Plugin
CategoryOrder=-1
Index=0
Default=Pype Tile Assembler Plugin for Deadline
Default=OpenPype Tile Assembler Plugin for Deadline
Description=Not configurable
[OIIOTool_RenderExecutable]

View file

@ -28,7 +28,7 @@ LIST_KEYS = {
def GetDeadlinePlugin(): # noqa: N802
"""Helper."""
return PypeTileAssembler()
return OpenPypeTileAssembler()
def CleanupDeadlinePlugin(deadlinePlugin): # noqa: N802, N803
@ -36,7 +36,7 @@ def CleanupDeadlinePlugin(deadlinePlugin): # noqa: N802, N803
deadlinePlugin.cleanup()
class PypeTileAssembler(DeadlinePlugin):
class OpenPypeTileAssembler(DeadlinePlugin):
"""Deadline plugin for assembling tiles using OIIO."""
def __init__(self):
@ -157,7 +157,7 @@ class PypeTileAssembler(DeadlinePlugin):
def pre_render_tasks(self):
"""Load config file and do remapping."""
self.LogInfo("Pype Tile Assembler starting...")
self.LogInfo("OpenPype Tile Assembler starting...")
scene_filename = self.GetDataFilename()
temp_scene_directory = self.CreateTempDirectory(
@ -191,7 +191,7 @@ class PypeTileAssembler(DeadlinePlugin):
tile["filepath"]))
pass
self.LogInfo("Pype Tile Assembler Job finished.")
self.LogInfo("OpenPype Tile Assembler Job finished.")
def handle_stdout_error(self):
"""Handle errors in stdout."""

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

View file

@ -1,3 +1,3 @@
## Pype Deadline repository overlay
## OpenPype Deadline repository overlay
This directory is overlay for Deadline repository. It means that you can copy whole hierarchy to Deadline repository and it should work.