Thanks for the info, Chris. Is Nuke's Flare node so bad that it's worth going out to AE?
And thanks about the book. Ron Ganbar email: [email protected] tel: +44 (0)7968 007 309 [UK] +972 (0)54 255 9765 [Israel] url: http://ronganbar.wordpress.com/ On 30 July 2012 14:36, John RA Benson <[email protected]> wrote: > looks like 1 problem is here: > > * > aerender().*AErender_this(project='C:\Data\Sc01_WarpStabilizer_V01.aep', > comp='WarpStabilized', start=0, stop=446) > > if you are only running the function below as is, then try: > import os > import subprocess > > AErender_this(project='C:\Data\Sc01_WarpStabilizer_V01.aep', > comp='WarpStabilized', start=0, stop=446) > > jrab > > > On 07/30/2012 11:27 AM, tw1sted1981 wrote: > > Thank you also Fabian, for sharing such a complex piece of code ( well in > my eyes anyway!) you might of read I took the advice of not sitting on the > computer during such a nice weekend and I hope to test this out. > > I did early this morning sort out the indentations and can import it into > my menu.py file. For testing purposes should I be able to call and run the > script from the script editor? > > when I try this > > [code]aerender().AErender_this(project='C:\Data\Sc01_WarpStabilizer_V01.aep', > comp='WarpStabilized', start=0, stop=446) *Fabian Fischer wrote:* esult: > Traceback (most recent call last): > File "**", line 1, in ** > TypeError: 'module' object is not callable > > I hope to tinker more with this during my lunch and Nathans suggestion > also to see which I can get to work. I am still very new to python coding > so pulling together what I can > > Thanks again > > -Chris > > > [quote="Fabian Fischer"]Hi Chris, > > as Nathan said, subprocess is definitly the way to go. I wrote this > function last year for a standalone render script. I decided to use > subprocess.call instead of popen (call is a just a convenience function for > popen). Perhaps it doesn't exactly fit your needs and perhaps it is not as > nifty as it could be but it should give you some more ideas for tinkering > [image: > Wink] > It looks after a given comp if you dont give a comp-name it trys to render > the render qeueu as it is saved in your ae file and it creates output > directorys especially if youe render a file sequence (set "seq=0" if you > render to a single videofile like .mov) RM and OM are the rendermodule and > outputmodule as you named them in in AE. > dont forget to import subprocess and os... > > def AErender_this(project=None, comp=None, output=None, start=None, > stop=None, RM='Optimale Einstellungen', OM='seq_jpg', seq=1, mp=1): > # AErender_this v1.2.bmw_m 29.06.2011 > AEexec = 'C:\\Program Files\\Adobe\\Adobe After Effects CS5.5\\Support > Files\\aerender.exe' > sequence='_[#####]' > if not project and not comp: > print('! no project-file defined - displaying version only') > param = [AEexec, '-version'] > elif project and not comp: > print('! rendering project queue') > param = [AEexec, '-project', project] > elif project and comp: > print('! rendering composition: ' + comp) > if not seq: > output = output + '/' + comp > else: > print('! sequence mode - looking for output dir') > output = os.path.normpath( output + '/' + comp ) > if not os.path.isdir(output): > print('! not found - creating directory: '+output) > os.mkdir(output) > else: > print('! success: '+output) > output = output + '/' + comp + sequence > > param = [AEexec, '-project', project, '-comp', comp, '-s', str(start), > '-e', str(stop), '-output', output, '-RStemplate', RM, '-OMtemplate', OM] > > if mp: > param.append('-mp') > p = subprocess.call(param, shell=True) > #print(p) > return(p) > > > The behaviour of the aerender.exe is a bit strange, "shell=True" is a > must, even if the python documentation recommends you to set it to false. > In an OS X environment you have to pack all your arguments including spaces > into one single argument for subprocess, if you try to do it with a list, > aerender won't recognize your arguments, it just returns strange exitcodes > that are not documented (of course they are not - it's adobe [image: Wink]) > > hope that helps - have a nice weekend instead of tinkering too much, > > fabian > > > > Am 27.07.2012 19:57, schrieb tw1sted1981: > > *Quote:* --> --> 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 > > > *Quote:* > **** > > > _______________________________________________ > Nuke-python mailing [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 > >
_______________________________________________ Nuke-python mailing list [email protected], http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
