Is it possible to set job environment variables with a custom event. Or do you have to do this in the JobPreload script? The downside to the job preload script in this solution is that I would have to create a py file for every Plugin type.
The custom event would blanket all plugins in a single file.
this is what I’ve been looking at recently and have been using a modified version of the GitHub script
This grabs the env vars in use and sends them with the job which works great for maya / houdini with different versions of centrally installed plugins.
Seems to fail on C4D jobs though where the local user env vars get sent anyway and it trys to write temp stuff to the submission users folder which isn’t on the nodes.
You can read submission info from the JobPreLoad files, as they get a deadlinePlugin object passed to them. You can grab the job from it with job = deadlinePlugin.GetJob() and from there you can read submission information and set environment variables accordingly.