-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Customizing DCC Submitters (UI, settings, hooks, custom steps) #308
Comments
Custom GUI ControlsI think the first thing we need to determine here is if it is ok to have all custom controls on a separate tab, or if we need to provide the ability to add custom elements to each existing tab (Shared Job Settings, Job-Specific Settings, Job Attachments, Host Requirements) Shared Job SettingsI don't have any suggestions for what may be added to this section. Please suggest ideas. Job-Specific SettingsThis is a DCC submitter provided Job AttachmentsI don't have any suggestions for what may be added to this section. Please suggest ideas. Host RequirementsThe main modification that I anticipate seeing here would be setting up default settings within this Host Requirements widget and I see that either via passing this widget and implementing a programmatic api on it that can be set, or allowing these settings to be pre-defined by some sort of developer provided "settings override". Based on my initial look into the potential UI overrides, I think the most likely place a developer may want to override UI controls is in the Job-Specific Settings. I think we will want to allow them to provide their own UI Settings object as well. |
Overriding Settings / Default SettingsThe We should just need an interface that provides the settings objects, allowing them to be changed |
Translation of Assets into OpenJDI feel like providing the |
Custom OpenJD stepsThis is where my lack of OpenJD knowledge starts to show. I feel like we would have to provide some array of steps and allow the developer to return a potentially modified array usable for the submission. |
Post SubmissionThis would be some interface that allows calling a developer provided function. I don't see a use for myself to have any UI based settings, however it may be valuable to have a "JobID" or some summary of the action that was just performed. My personal use case would be limited to modifying the DCC scene |
InterfacesIs this going to be a single "mega interface" that allows adding UI widgets, modifying settings, providing additional assets, and changing the OpenJD steps? Or do we see this as a few different optional hooks that can be called. I lean towards the latter, allowing a That way developers and studios could choose to subscribe to as few or as many of those custom steps as they need without having to build a huge callback that takes a bunch of different unrelated parameters. Would love any thoughts around this proposed grouping as well. |
Thanks for writing all this up! I've been thinking on this for a little while, and the critical piece I want to focus would be the mechanism in which a user brings and applies their customization to 1 or many applications. Once we have this part figured out, actually adding the specific places in which a user can then hook into doesn't seem too particularly difficult. Aside: Even with all of this, at some point a user may decide that it's easier to just write their own submitter using our library/parts, and that's totally fine and definitely encouraged. But if we can ease them into that with something here, it's probably a better experience than saying, "if you want anything different, fork and maintain it yourself". I know in the original example PR, you leveraged an environment variable as a way to load the custom code for the specific DCC+callback combination. And I can see the appeal there since it's easy to manage configurations environments that have their specific settings/callbacks set. Do we see use-cases where multiple customizations for the DCC+callback combination could be applied? This leads me to the next thought where an alternative to only leveraging environment variables for loading, we could implement a plugin system with deadline-cloud to allow users to inform deadline-cloud about their customizations. Given a say a default plugin folder (customizable via environment variable?) within the I see a few benefits with this:
Enforcing an ordering to modifications that are affecting the same thing would definitely be something to consider. There's probably more to think about that I haven't touched upon here, but that's the way I'm leaning. Thoughts? |
Hi @epmog So I have a WIP POC version up that I have been using internally here with one customer that is using environment variables. In the DCC submitter layer ( ...
callback_kwargs = {}
if os.path.exists(os.environ.get("DEADLINE_NUKE_UI_CALLBACK", "")):
try:
on_ui_callback = ui_callback.load_ui_callback(
module_path=os.environ.get("DEADLINE_NUKE_UI_CALLBACK")
)
except Exception:
import traceback
raise DeadlineOperationError(
"Error while loading on_pre_submit_callback at {path}. {trace}".format(
path=os.environ.get("DEADLINE_NUKE_UI_CALLBACK"),
trace=traceback.format_exc()
)
)
callback_kwargs["on_ui_callback"] = on_ui_callback
if os.path.exists(os.environ.get("DEADLINE_NUKE_POST_SUBMIT_CALLBACK", "")):
try:
on_post_submit_callback = post_submit_callback.load_post_submit_callback(
module_path=os.environ.get("DEADLINE_NUKE_POST_SUBMIT_CALLBACK"),
)
except Exception:
import traceback
raise DeadlineOperationError(
"Error while loading on_post_submit_callback at {path}. {trace}".format(
path=os.environ.get("DEADLINE_NUKE_POST_SUBMIT_CALLBACK"),
trace=traceback.format_exc()
)
)
callback_kwargs["on_post_submit_callback"] = on_post_submit_callback As you can see above, the structure I have proposed is
Your suggestion of a plugin folder is interesting as well. I have a few thoughts about that, firstly, are you planning on just adding that DEADLINE_PLUGIN_PATH to the PYTHONPATH and allowing python to load Secondly, are you thinking about additional plugin/integration points beyond the several we have defined above? I'd be interested to hear what else you're planning.
I could imagine a world where two departments at a larger studio each have their own deadline submitter plugin potentially and the desire is to make both run. I don't personally have a use case for that but I could potentially see someone asking for that down the road.
Regarding users writing their own submitters, I agree I think some power users/studios will end up writing their own submitters but making the Deadline reference implementation as flexible as possible will allow a central community/repository for people to start from. I'll be honest, starting to write my own OpenJD jobs and digging down into the internals of this implementation has been more difficult than I anticipated and I think that other developers that either have less experience or less time may also feel the same. I'm going to continue with my fork in the short term as it is helping me learn more about the codebase and respond with more relevant answers. Thanks for your thought on this @epmog. Let me know if you have any thoughts on anything I wrote above. |
Use Case
This is a discussion around scoping out a feature request that I initially asked in #292 around adding a "pre-submit" and "post-submit" callback.
After discussing with @epmog we have determined that some additional scoping around this is needed and I'd like to solicit opinions on it.
Proposed Solution
Initially the PR focused around two hooks that ran after the UI had been created but just before and just after the job was being submitted.
This was designed to solve my own use case of modifying a Nuke scene before a job submission and then reverting the changes for the artist just afterwards.
Our studios had been doing this around the "SubmissionHook.py" in the old Deadline application to strip out ShotGrid Toolkit Write Nodes from Nuke and convert them to generic write nodes so that the farm didn't have to deal with SGTK stuff.
epmog suggested potential features around the ability to create/embed custom gui controls, pre-populating values/overriding certain sticky settings, translate assets into openjd compatible ones, add custom steps/modify existing ones.
I can see these being grouped into "Before UI" and "After UI" options, with the "After UI" one being another chance to modify the scene.
The text was updated successfully, but these errors were encountered: