You can also use the arg list syntax with subprocess if you want, which
can save some headaches if you want to do complicated parameters for
AppleScript: (I'm assuming you want to start the script in a terminal
so you can see Nuke's terminal output)
import subprocess
apple_script = 'tell app "Terminal" to do script
"/Applications/Nuke6.1v2/Nuke6.1v2.app/Contents/MacOS/Nuke6.1v2 -i -f -t
-m 8 -F 1-100x1 -X Write1 /path/to/test.nk"'
subprocess.Popen(['osascript', '-e', apple_script])
To put the frame numbers in, you'll probably need some backslash quoting:
apple_script = 'tell app "Terminal" to do script "blah/Nuke6.1v2 -blah
-F \"8 16 24 32\" " '
Now that's a confusing one :)
Apologies for any errors; I'm not on OS X at the moment, so haven't
tested it.
- Chris
On 18/05/11 21:01, Deke Kincaid wrote:
Oh, forgot to add you could do the frame easier with just -F 0-90x8
then you only have to change the first frame number for each cpu spawn.
-deke
On Wed, May 18, 2011 at 12:58, Deke Kincaid<[email protected]> wrote:
I don't know applescript but Popen works just fine
import subprocess
subprocess.Popen('Applications/Nuke6.1v2/Nuke6.1v2.app/Contents/MacOS/Nuke6.1v2
-ift -m 8 -F "8 16 24 32 40 48 56 64 72 80 88 96" -X Write1
/path/to/test.nk', shell = True)
-deke
On Wed, May 18, 2011 at 12:17, Mathieu Jolicoeur<[email protected]> wrote:
First off, hello world! I am very happy to have stumbled on this mailing list!
I am trying to modify my background render launcher to have parallel
processes with defined framerange. I am working in OS X and like to
launch my renders in the Terminal so I can monitor the progress.
Right now I am using command:
os.system(" " "osascript -e 'tell app "Terminal" to do script
"/Applications/Nuke6.1v2/Nuke6.1v2.app/Contents/MacOS/Nuke6.1v2 -i -f
-t -m 8 -F 1-100x1 -X Write1 /path/to/test.nk" ' " " ")
The osascript command is simple Applescript to launch instance of
Terminal application. This works fine. My problem is that I am unable
to insert a specific set of frame numbers in the command, such as:
os.system(" " "osascript -e 'tell app "Terminal" to do script
"/Applications/Nuke6.1v2/Nuke6.1v2.app/Contents/MacOS/Nuke6.1v2 -i -f
-t -m 8 -F "8 16 24 32 40 48 56 64 72 80 88 96" -X Write1
/path/to/test.nk" ' " " ")
I tried with a couple different types of quoting syntax, but cannot
seem to find how to make it work. Can someone help me with the syntax?
Thanks,
Mathieu Jolicoeur
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
--
Chris Bevan, Senior Software Engineer
The Foundry, 6th Floor, The Communications Building
48 Leicester Square, London, WC2H 7LT
Tel: +44 (0)20 7968 6828 | Fax: +44 (0)20 7930 8906
Web: www.thefoundry.co.uk
The Foundry Visionmongers Ltd
Registered in England and Wales No: 4642027
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python