AWS Thinkbox Discussion Forums

Custom Deadline Event - How to Use Path Translation?

I’m using a custom Event running to grab certain Environment Variables (Modified this script to keep listed variables rather than ignore them)

Is it possible to include this Event in the path mapping so the Windows Mapped Drive gets translated to linux path?

Thanks
Ant

I’m going through the docs
https://docs.thinkboxsoftware.com/products/deadline/10.1/1_User%20Manual/manual/event-plugins.html
https://www.awsthinkbox.com/blog/deadline-event-plugins
I found something that looks promising here
https://docs.thinkboxsoftware.com/products/deadline/10.1/1_User%20Manual/manual/event-plugins.html#event-callback-details

RepositoryUtils.CheckPathMapping(path)
RepositoryUtils.CheckPathMappingInFile(inFileName, outFileName)
RepositoryUtils.CheckPathMappingInFileAndReplaceSeparator(inFileName, outFileName, separatorToReplace, newSeparator)
RepositoryUtils.PathMappingRequired(path)

https://docs.thinkboxsoftware.com/products/deadline/10.1/1_User%20Manual/manual/scripting-overview.html#scripting-overview-ref-label

I’ve gone through this, stuck PyCharm and configured it with Python37 (I think this is what 10.1.20.3 uses). Now I can see all the commands and the help files

(still no idea how to implement them but will keep reading)

I added this part of the bottom of the already modified file (I wanted env var keys rather than remove them)

        for key in wantedkeys:
            self.LogInfo("Setting %s to %s" % (key, os.environ[key]))
            val = os.environ[key]
            valmapped = RepositoryUtils.CheckPathMapping(val)
            self.LogInfo("Mapped Setting %s to %s" % (key, valmapped))
            job.SetJobEnvironmentKeyValue(key, valmapped)

Seems to work on my local laptop, but testing else where throws up errors about string/str and value seperators being semicolons not commas…

2 Likes
Privacy | Site terms | Cookie preferences