I would like to add some custom features to standard 3dsmax job. To do this I would like to import MaxPlugin class from 3dsmax.py to my custom python plugin file where I would be able to extend its functions. Blow I’m putting some pseudocode to show you what I want do achieve.
Proof of Concept:
# file DeadlineRepository7/custom/plugins/MyCustomPlugin.py
from plugins.3dsmax import MaxPlugin # how to do this import?
# GetDeadlinePlugin and CleanupDeadlinePlugin definitions
class MyCustomPlugin (MaxPlugin):
def StartJob(self):
# my custom logic - part 1
super(MyCustomPlugin, self).StartJob()
# my custom logic - part 2
Currently this is not possible as each slave when it dequeues a job will grab whatever “plugin” it requires from the Deadline repository for that “jobPlugin” type. If you create a “myCustomPlugin”, then the slave’s would copy down this “myCustomPlugin” for your “customJob” and not the “original” or referenced plugin which you wish to import. It’s best to use the local plugin copy then point your whole farm at opening the plugin files from your repo.
Currently, the approach would be to take one of our plugins, copy it, rename it and customize as you see fit. Place this custom plugin under the “/custom/plugins/” directory so we don’t overwrite it during a repository upgrade and your also free to place it under source code control as you see fit as well.
As I suspected but just wanted to be sure. This is not a big deal, because I’ve already have a copy of plugin script which I further extend - as you suggested. I just wanted to make this a little bit cleaner.
It’s not a single feature. We have complex workfolw with lots of pre/post render scripts and pre/post task scripts. I have reimplemented them in single place (a custom plugin script) to this make a little bit more manageable.