Thread: send to Shellrender from GUI (Windows)

Reply to Thread
Results 1 to 2 of 2
  1. #1 send to Shellrender from GUI (Windows) 
    Join Date
    Aug 2004
    Location
    Germany
    Posts
    155
    hi all,

    i don't know if something similar has been posted here but i wrote a script that lets you send the current script to shell rendering (windows only). all you have to do is change the paths accordingly and make a menu entry in your menu.py. the script saves your currently open nuke script and writes a temporary batch file, which is then executed:

    import nuke
    import os

    def NukeShellRender():
    nuke.scriptSave()
    scriptPath = nuke.toNode('root')
    sPath = scriptPath.name()
    f=open('D:\\TEMPORARYFILES\\tmp.bat', 'w')
    filecontent='set NUKE_TEMP_DIR=E:\Nuke_Cache\nset NUKE_PATH=D:\YOUR_NUKEINSTALL_DIRECTORY\Nuke5.0v2' + '\\' + 'nuke5.0.exe -x ' + sPath + '\n pause'
    f.write(filecontent)
    f.close()
    os.startfile('D:\\TEMPORARYFILES\\tmp.bat')



    please note that i am not a programmer, so use at your own risk. but i can assure you it works on our boxes. i am sure someone else has a way better workaround for this so don't kill me.

    andy
    Reply With Quote  

  2. #2  
    Join Date
    Sep 2004
    Posts
    221
    This may work on a PC, which would make it a little more portable. Only bug in it so far on a mac is its tendency to pop up a blank message the first time it completes. Also I'd rather get this working with spawnv, but so far it's locking up because of the python thread already being run in nuke.

    Code:
    import nuke
    import os
    
    def NukeShellRender():
        nuke.scriptSave()
        scriptPath = nuke.toNode('root').name()
        nukePath = nuke.env['ExecutablePath'] + ' -x -n -q -t -i ' + scriptPath
        os.popen(nukePath)
    Also if you find it doesn't work the first time off the bat on a PC, try removing the '-t ' part of the nukePath string.
    Reply With Quote  

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Nuke 5.1 v1 Released
    By shot_grable in forum NUKE from The Foundry
    Replies: 36
    Last Post: July 17th, 2010, 01:33 AM
  2. New Series of Python GUI tools
    By veefxjee in forum NUKE from The Foundry
    Replies: 9
    Last Post: August 29th, 2009, 09:45 AM
  3. Replies: 0
    Last Post: June 15th, 2007, 10:33 AM
  4. ZBrush 2 64-bit Windows Version Now Available
    By CGnews in forum Industry News
    Replies: 0
    Last Post: February 20th, 2007, 04:43 PM
  5. Tippett : Windows Systems Admin
    By Aruna in forum The Job Lot
    Replies: 0
    Last Post: September 20th, 2005, 07:38 PM
Bookmarks
Bookmarks
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts