From f82e87787a88a534ac64eae549b526b0e84878b0 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Thu, 1 Apr 2021 21:44:30 +0200 Subject: [PATCH] DL - cleanup, add documentation --- .../custom/events/OpenPype/OpenPype.param | 4 +-- .../custom/plugins/OpenPype/OpenPype.options | 31 ------------------- .../custom/plugins/OpenPype/OpenPype.param | 13 ++------ .../custom/plugins/OpenPype/OpenPype.py | 7 ++--- vendor/deadline/readme.md | 31 ++++++++++++++++++- 5 files changed, 36 insertions(+), 50 deletions(-) diff --git a/vendor/deadline/custom/events/OpenPype/OpenPype.param b/vendor/deadline/custom/events/OpenPype/OpenPype.param index c9610ffd19..871ce47467 100644 --- a/vendor/deadline/custom/events/OpenPype/OpenPype.param +++ b/vendor/deadline/custom/events/OpenPype/OpenPype.param @@ -28,8 +28,8 @@ Default=DEBUG Description=Logging level where printing will start. [OpenPypeExecutable] -Type=MultiLineMultiFolder -Label=Path to OpenPype executable dir +Type=multilinemultifilename +Label=Path to OpenPype executable Category=Job Plugins CategoryOrder=1 CategoryIndex=1 diff --git a/vendor/deadline/custom/plugins/OpenPype/OpenPype.options b/vendor/deadline/custom/plugins/OpenPype/OpenPype.options index df75bbe0fb..6908fe865f 100644 --- a/vendor/deadline/custom/plugins/OpenPype/OpenPype.options +++ b/vendor/deadline/custom/plugins/OpenPype/OpenPype.options @@ -1,13 +1,3 @@ -[ScriptFile] -Type=filename -Label=Script File -Category=Python Options -CategoryOrder=0 -Index=0 -Description=The script file to be executed. -Required=false -DisableIfBlank=true - [Arguments] Type=string Label=Arguments @@ -18,24 +8,3 @@ Description=The arguments to pass to the script. If no arguments are required, l Required=false DisableIfBlank=true -[Version] -Type=enum -Values=3.0 -Label=Version -Category=Python Options -CategoryOrder=0 -Index=2 -Description=The version of Python to use. -Required=false -DisableIfBlank=true - -[SingleFramesOnly] -Type=boolean -Label=Single Frames Only -Category=Job Options -CategoryOrder=1 -Index=0 -Description=If enabled, the plugin will only render one frame at a time even if a single task contains a chunk of frames. -Required=true -DisableIfBlank=true -Default=false diff --git a/vendor/deadline/custom/plugins/OpenPype/OpenPype.param b/vendor/deadline/custom/plugins/OpenPype/OpenPype.param index 9bf9ba25e7..8bd6dce12d 100644 --- a/vendor/deadline/custom/plugins/OpenPype/OpenPype.param +++ b/vendor/deadline/custom/plugins/OpenPype/OpenPype.param @@ -7,18 +7,9 @@ Index=0 Default=OpenPype Plugin for Deadline Description=Not configurable -[ConcurrentTasks] -Type=label -Label=ConcurrentTasks -Category=About Plugin -CategoryOrder=-1 -Index=0 -Default=True -Description=Not configurable - -[OpenPype_Executable_3_0] +[OpenPypeExecutable] Type=multilinemultifilename -Label=OpenPype 3.0 Executable +Label=OpenPype Executable Category=OpenPype Executables CategoryOrder=0 Index=0 diff --git a/vendor/deadline/custom/plugins/OpenPype/OpenPype.py b/vendor/deadline/custom/plugins/OpenPype/OpenPype.py index e03bea9c0c..451d71fb63 100644 --- a/vendor/deadline/custom/plugins/OpenPype/OpenPype.py +++ b/vendor/deadline/custom/plugins/OpenPype/OpenPype.py @@ -53,14 +53,11 @@ class OpenPypeDeadlinePlugin(DeadlinePlugin): ".*Progress: (\d+)%.*").HandleCallback += self.HandleProgress def RenderExecutable(self): - version = self.GetPluginInfoEntry("Version") - - exeList = self.GetConfigEntry( - "OpenPype_Executable_" + version.replace(".", "_")) + exeList = self.GetConfigEntry("OpenPypeExecutable") exe = FileUtils.SearchFileList(exeList) if exe == "": self.FailRender( - "OpenPype " + version + " executable was not found " + + "OpenPype 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.") diff --git a/vendor/deadline/readme.md b/vendor/deadline/readme.md index 34d4403bf5..803a290050 100644 --- a/vendor/deadline/readme.md +++ b/vendor/deadline/readme.md @@ -1,3 +1,32 @@ ## 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. + This directory is overlay for Deadline repository. + It means that you can copy whole hierarchy to Deadline repository and it should work. + + Logic: + ----- + Event + ----- + For each rendering job OpenPype event is triggered, it stores path to OpenPype + executable (needs to be configured on `Deadline's Configure Events > OpenPype`) + job's extra key 'openpype_executables'. + + This value is used by `GlobalJobPreLoad` to call that executable to pull + environment's variables which are needed to add to ALL plugins process environments. + These env. vars are injected into rendering process. + + Event is necessary here as a middle man to allow configuring location of executable + which is ONLY then used by `GlobalJobPreLoad` (which doesnt have any user facing + configuration at all). + + `GlobalJobPreLoad` is triggered before each job, it contains backward compatible + logic to not modify old Pype2 or not OpenPype triggered jobs. + + Plugin + ------ + For each publishing job `OpenPypeDeadlinePlugin` is called, which calls + configured location of OpenPype executable (needs to be configured in + `Deadline's Configure Plugins > OpenPype`) + and triggers command. + +