You’re probably running into a couple of different problems. One is that your application path has spaces in it, so shlex.split is going to destroy it.
The other is, without using a raw string or properly escaping your backslashes, your occurrences of \a are actually interpreted as BEL control characters. The quickest way to get it working will probably be by using a raw string, skipping the call to shlex.split, and calling Popen with shell=True. However, this will be highly inflexible, so you’ll probably want to consider building up your own args list to pass to Popen instead. Simple example: # These variables might come from some kind of user prompt GUI... startFrame = 1 endFrame = 50 aeProject = r'C:\afterFX\AE_file.aep' aeComp = 'rendercomp' # Broken up into lines for clarity args = [r'C:\Program Files\Adobe\Adobe After Effects CS5.5\Support Files\aerender', '-project', aeProject] args.extend(['-comp', '"%s"' % aeComp, '-s', str(endFrame), '-e', str(endFrame)]) subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) -Nathan From: tw1sted1981 Sent: Friday, July 27, 2012 10:57 AM To: [email protected] Subject: [Nuke-python] Executing an after effects render via a button I have a write node that I am feeding into AfterEffects and then reading the contents back into Nuke. I have the command line for AE all figured out and I have been looking online here at some examples using ffmpeg but I just cant seem to get my code to work in the script editor I am using a PC and this is the command line I would want to execute C:\Program Files\Adobe\Adobe After Effects CS5.5\Support Files\aerender -project C:\afterFX\AE_file.aep -comp "rendercomp" -s 1 -e 50 This is the post I was trying to adjust to make work for my intents but no luck http://forums.thefoundry.co.uk/phpBB2/viewtopic.php?t=6777&highlight=execute+command Can anyone make any suggestions, I think I am mostly having trouble knowing what should be in quotes and what shouldnt be. I was also wondering if whenrunning these kinds of scripts in the script editor if you see the program load up, even with the ffmpeg code I just get a '# Result:' I will tinker more during the weekend but I am sure someone can point me in the right direction As always thanks in advance -Chris -------------------------------------------------------------------------------- _______________________________________________ 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
