Compify 720x486 -- update for AE7 to allow adding Presets

All things .jsx

Moderator: Paul Tuersley

User avatar
Enhancement master
Posts: 460
Joined: June 17th, 2004, 9:27 am
Location: New York City, NY

thomwill wrote:heh. actually i've got another question. is it possible to have it make a new comp from a selected movie and have it do the same thing, rather than having to make a 720x540 comp first? the reason i ask is i usually render everything at 720x540 and then create a new project to convert my movies to D1.

guess i just need to learn some scripting...
Hey Thom,

I created new scripts that work with footage sources, you can get those here:


User avatar
Enhancement master
Posts: 460
Joined: June 17th, 2004, 9:27 am
Location: New York City, NY

thomwill wrote:great script. couple questions though. is it possible to modify the script so that more than one effect can be added, and settings of eihter effect be adjusted? for example, if in addtion to the broadcast colors, i wanted to add a levels pass as well with the output white setting adjusted to 249.

i know nothing about scripting whatsoever. i was able to figure out enough to change the default prefix and suffix, but thats about the extent of it for me. any help or suggestions here would be greatly appreciated.



oh yeah, i'm running 6.5, otherwise i'd use the version for 7 and just save a preset with the settings.

To do that i would have to custom write the script to work with specific effects to know which values to set. That's why i wrote the animation presets version so that you can add as many filters as you want with your own settings (without having to mess with the script), but unfortunately only 7 allows calling animation presets in scripting.

Posts: 7
Joined: April 3rd, 2006, 7:21 pm

great. thanks man. time to upgrade i guess.
Posts: 36
Joined: September 21st, 2004, 7:29 am


Thanks for this script.
I currently need to output tons of files into 720x576 DV/PAL comps so I've slightly modified the script to output it correctly.

*** EDIT : I've seen the original script from Byron Nash and it exactly does what I've modified, so, if this script isn't helpful, let me know and I'll delete this post. ***

Here it is :

Code: Select all

//Byron Nash, Edited and Improved by Paul Tuersley
//October 2004
//720x486 mode by Lloyd Alvarez August, 2005 (with a little help from Dan Ebberts, thanks Dan!)
//This script takes any Comps and makes new 720x486 D1 Aspect Ratio Comps 
//with the Comps added and scaled to fit for proper D1 output. 
//Select the Comps you would like resized or select none to do all the Comps
//enter a prefix and suffix at prompt to be appended to the newly created comp name

	var mySuffix = "_PAL"; //default values
	var myPrefix = "_";
	myPrefix = prompt("What prefix would you like to add to the new 720x576 Comps? (*leave it blank for no prefix)", myPrefix);
	mySuffix = prompt("What suffix would you like to add to the new 720x576 Comps? (*you have to have a suffix!)", mySuffix);

	var proj = app.project;//set project

	if (mySuffix) {
		// create undo group if user didn't cancel dialog
		app.beginUndoGroup("Compify 576");

		var projColl = proj.items;//list of items in project
		var myComps = new Array();//array for storing all the comps made

		var selItems = app.project.selection;//set selected import items to an array
		if (selItems.length > 0){//check to see if anything is selected
			var myColl = app.project.selection;//if so the use the selection
			var i = 0;
		} else {//if not, use entire project contents
			var myColl = new Array();
			for (j=0; j < projColl.length; j++){//add project list to an array
				myColl[j] = projColl[j+1];

		var suffix = mySuffix;
		var prefix = myPrefix;
		for (i=0; i <= myColl.length; i++) {//loop through the project
			var curItem = myColl[i];
  			if (curItem instanceof CompItem) {//check for footage items
    				//add suffix to comp name and remove the file extension
    				var curName = prefix + + suffix;
       				//Truncate comp name if it exceeds the 31 character limit
       				if (curName.length > 30){
					curName = curName.slice(0,29-suffix.length) + " " + suffix;
       				//setup comp variables
       				var curAspect = curItem.pixelAspect;
       				var curWidth = curItem.width;
       				var curHeight = curItem.height;
       				var compSize = [curWidth,curHeight];
       				var curDuration = curItem.duration;
       				var curRate =  curItem.frameRate;
       				var curMB = curItem.motionBlur;
       				var curFB = curItem.frameBlending;
       				var cur3D = curItem.draft3d;
				//create comp and add layer
				var newComp = projColl.addComp(curName,720, 576,1.07,curDuration,curRate);//make new comp
				newComp.motionBlur = curMB; //sets Comp Motion Blur, Frame Blend and Draft 3D to match source Comp
				newComp.frameBlending = curFB;
				newComp.draft3d = cur3D;

				var lcoll = newComp.layers;//variable for collection of layer objects in logoComp
				lcoll.add(curItem);//add layer
				var myLayer = newComp.layer(1);
				var myWidth = myLayer.width;
				var myHeight =  myLayer.height;
				var myLayerAspectRatio = (myWidth/myHeight);
				var myPropertyScale = myLayer.scale;
				var myComp = app.project.activeItem;
				var percent = 100; // percent of comp size
				var myTargetCompWidth = 720; //target comp width
				var myTargetCompHeight = 576; //target comp height 
				var myTargetCompAspect = 1.07; //target comp pixel aspect ratio
				var myCompAspectRatio = (myTargetCompWidth/myTargetCompHeight);
				var scaleX = (myTargetCompWidth * myTargetCompAspect)/(myWidth*myLayer.source.pixelAspect);
				var scaleY = myTargetCompHeight/myHeight;
				myLayer.collapseTransformation = false; //set this to false if you do not wish to collapse transformations

				myComps[myComps.length] = newComp;//add comp to array
		writeLn("Created " + myComps.length + " Comps");
	     if (confirm("Would you like to add the new 720x576 Comps to the Render Queue?")){
		var sectionName = "Compify 720x576 Script"; 
		var keyName = "Render comps with this string"; 
		var searchString = ""; 
		if (app.settings.haveSetting(sectionName, keyName)) { 
		searchString = app.settings.getSetting(sectionName, keyName); 
		//searchString = prompt("What string to render?", searchString);
		searchString = mySuffix;
			if (searchString) { 
			app.settings.saveSetting(sectionName, keyName, searchString); 
			searchString = searchString.toLowerCase(); 
			for (i = 1; i <= app.project.numItems; ++i) { 
				var curItem = app.project.item(i); 
				if (curItem instanceof CompItem) { 
					if ( != -1) { 

Post Reply