From: Urs Franzen <u.franzen@(email surpressed)>
Subject: Re: Nuke Submit...
   Date: Tue, 18 Jan 2011 10:14:52 -0800
Msg# 1991
View Complete Thread (7 articles) | All Threads
Last Next
I had a similar problem, I first went a different way to send to rush,
which ended in a mess with no BatchClip, lots of retries, unrendered frames
(cant rename temp to final....)
this works great, but is there an option to hide the interface? so I don't
have to press submit?
or will this bust everything?

what I did before switching to gregs solution was this:

def ufrSendToRush():
    nuke.scriptSave()
    n=nuke.thisNode()
    vshot =
n.knob('seq').value()+'_'+n.knob('subseq').value()+'_'+n.knob('numb').value()
    vartist=n.knob('artist').value()
    vversion='v'+n.knob('version').value().zfill(3)
    title=vshot+'_'+vartist+'_'+vversion
   
frames=str(nuke.toNode('Read1').knob('first').value())+'-'+str(nuke.toNode('Read1').knob('last').value())
    logdir=('/Boutique/Jobs/.rushlogs')
    command='perl /Boutique/common/rushscripts/submit-nuke.pl -render  ' +
nuke.root().knob('name').value() + ' 5 0 3 Fail Licpause+Retry 0 off -V'
    cpus='+farm=12'
    # COMBINE VARIABLES
    render='title '+title+'\n'+'frames '+frames+'\n'+'logdir
'+logdir+'\n'+'command '+command+'\n'+'cpus '+cpus+'\n'
    # SUBMIT THE JOB
    submit = os.popen("rush -submit", 'w')
    submit.write(render)
    err = submit.close()
    if err:
	nuke.message('submit failed, error code: '+str(err))
    else:
        nuke.message('sent to farm, be happy!')

what was my mistake?

cheers, urs


Craig Allison <craig@(email surpressed)> wrote:
> That's a great help, I'd already added the submit to the central menu.py =
> but it wasn't pulling through those values, this will make it much nicer =
> for the guys.
> 
> Only thing I had to add to the centralised script was the declaration:
> 
> "import nuke, os"
> 
> before
> 
>> nukescript = nuke.Root().name()
> 
> 
> 
> Awesome as ever Greg, thank you!
> 
> Craig
> 
> 
> Craig Allison
> Digital Systems & Data Manager
> The Senate Visual Effects
> 
> 
> On 11 Nov 2010, at 01:13, Greg Ercolano wrote:
> 
>> [posted to rush.general]
>> 
>>> Craig Allison wrote:
>>>> Has anyone done a Nuke submit script that auto pulls in all the basic
>>>> requirements for rendering from the current open script (i.e. Script
>>>> path, frames etc.)?
>>>> 
>>>> Looking to get our current submit a little more elegant so any tips
>>>> gratefully received!
>> 
>> 	Here's something simple that adds a Rush/Submit item
>> 	to the nuke menu bar:
>> 
>> ---- snip
>> def RushSubmit():
>>    nukescript = nuke.Root().name()
>>    sfrm = nuke.Root().firstFrame()
>>    efrm = nuke.Root().lastFrame()
>>    cmd = ( "perl //yourserver/somewhere/rushscripts/submit-nuke.pl " +
>>                "-field Frames: %(sfrm)s-%(efrm)s " +
>>                "-field NukeScript: \"%(nukescript)s\" 2>&1 " ) % locals()
>>    if ( os.path.isdir("/var/tmp") ): cmd += "&"
>>    os.system(cmd)
>> 
>> nukebar = nuke.menu("Nuke")
>> item    = nukebar.addMenu("Rush", "icon.png")
>> item.addCommand('Submit', 'RushSubmit()')
>> ---- snip
>> 
>> 	When you click the item, the rush submit form should pop up
>> 	with the Frames: and Nuke Script: fields filled out for you
>> 	with the currently loaded nuke file.
>> 
>> 	Feel free to add more logic, eg. to warn the user if no nuke
>> 	file is loaded, or the current nuke script has not been saved
>> 	before submitting. I kept the above example simple so you can
>> 	see clearly what's going on.
>> 
>> 	You can paste the above into the nuke script editor to test it
>> 	(see "TUTORIAL" instructions in my last posting for how to do that),
>> 	and when you have it all working, you can add it to nuke's menu.py file.
>> 
>> 	Just be sure to at least change "//yourserver/somewhere/rushscripts/submit-nuke.pl"
>> 	to where you have your submit-nuke script.
>> 
>> 	Note this assumes you're using a semi-recent submit-nuke.pl script
>> 	that allows the -field command line options.
>> 
>> 	Regarding the 'menu.py' file, if you add it to the one in the
>> 	Nuke directory, it will appear for all users. eg:
>> 
>> 		Linux: /usr/local/Nuke6.1v1-32/plugins/menu.py
>> 		Windows: c:/program files/nuke6.1v1/plugins/menu.py
>> 
>> 	Or, if you add it to your home directory ~/.nuke/menu.py,
>> 	then it will just work for you. (a good way to test, if you
>> 	don't have root/administration perms)
>> 
>> 	Let me know if you have any questions.
>>

Last Next