Hi, this snippet should be appended in the submitter (DL repository/submission/SubmitNukeToDeadline.py), to the submitJob function, where the lines with "fileHandle.write( ..." are, before closing the filehandle. In nuke we store custom datas on root(), but you may need to change the first 2 line to get your data properly from nuke:
shotGroup = nuke.root()['shotgroup'].value() shotId = nuke.root()['shotid'].value() fileHandle.write( "ExtraInfo1=%s\n" % shotGroup) fileHandle.write( "ExtraInfo2=%s\n" % shotId ) so after getting the proper value from nuke, this way it gets written into the deadline job info file. Then you should create a PreLoad.py file in the deadline repository/plugins/nuke folder, and similarly to the topic I sent before, you get the needed value this way: from System import * def __main__( *args ): shotGroup = GetJobInfoEntry('ExtraInfo1') shotId = GetJobInfoEntry('ExtraInfo2') and then you set the envs in this preload.py according to your needs. Like: Environment.SetEnvironmentVariable( "SHOTIDVAR", shotId ) hope this helps, Gabor On Fri, Jun 22, 2012 at 4:37 PM, Ivar Rystad (Storyline Studios) < i...@storyline.no> wrote: > ** > Yes! This is exactly what we need! We're using the standard nuke > submitter, so any help with customizing that would be appreciated. The > documentation was kinda thin on how to the preLoad.py gets the extrainfo... > > > Den 22.06.2012 16:11, skrev Gabor L. Toth: > > Hi, I would do it as extrainfo arguments. How do you submit your job to > deadline? Standard nuke submitter, monitor, or from custom gui? If from > nuke, you need to change a bit the submitter, I can give you details. After > if you detect some way the needed environment, the optional preload.py can > be used to set the variables for the slave, see this > topic<http://forums.thinkboxsoftware.com/viewtopic.php?f=11&t=6285&p=25214&hilit=preload#p25214> > : > > Hope this helps > Gabor > > > On Fri, Jun 22, 2012 at 2:38 PM, Ivar Rystad (Storyline Studios) < > i...@storyline.no> wrote: > >> Hi all! >> I`m setting up a nuke pipeline, using some of the tools described in the >> Asset Management part of the help files. Everything is working fine and >> dandy, got my own PyQt-launcher which launches Nuke with show,seq,shot env >> variables. >> >> But when submitted (through Deadline) to our renderfarm it all falls >> down... >> So my question is, how can i send the env variables with the nuke script >> to the renderfarm? >> >> -- >> [image: >> storyline]<http://www.storylinestudios.no/?utm_source=emailsignature&utm_medium=email&utm_campaign=emailsignature> >> IVAR >> RYSTAD VFX artist EMAIL i...@storyline.no PHONE (+47) 22 13 51 70 >> MOBILE (+47) 41 51 42 14 FAX (+47) 22 13 51 71 ADDRESS Drammensveien >> 130, 00277, Norway >> storyline.no<http://www.storylinestudios.no/?utm_source=emailsignature&utm_medium=email&utm_campaign=emailsignature>| >> showreeel <http://vimeo.com/12047424> | >> vimeo<http://vimeo.com/storylinestudios>| >> twitter <http://twitter.com/storylinest> >> >> _______________________________________________ >> Nuke-python mailing list >> Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ >> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python >> >> > > _______________________________________________ > Nuke-python mailing listnuke-pyt...@support.thefoundry.co.uk, > http://forums.thefoundry.co.uk/http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python > > > > -- > [image: > storyline]<http://www.storylinestudios.no/?utm_source=emailsignature&utm_medium=email&utm_campaign=emailsignature> > IVAR > RYSTAD VFX artist EMAIL i...@storyline.no PHONE (+47) 22 13 51 70 > MOBILE (+47) 41 51 42 14 FAX (+47) 22 13 51 71 ADDRESS Drammensveien > 130, 00277, Norway > storyline.no<http://www.storylinestudios.no/?utm_source=emailsignature&utm_medium=email&utm_campaign=emailsignature>| > showreeel <http://vimeo.com/12047424> | > vimeo<http://vimeo.com/storylinestudios>| > twitter <http://twitter.com/storylinest> > > _______________________________________________ > Nuke-python mailing list > Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python > >
_______________________________________________ Nuke-python mailing list Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python