Quick effects palette

All things .jsx

Moderator: Paul Tuersley

Simma
Posts: 98
Joined: June 8th, 2010, 2:57 pm

June 9th, 2010, 7:50 am

Fantastic, will try it out!
Fred Vianna
Posts: 2
Joined: June 7th, 2010, 4:10 pm

June 9th, 2010, 8:50 pm

Hey, CFX,
Thanksfor the tip !!!!!!!!

Is realy so simple ...

But i need to study a lot ...

I downloaded the script guide, and reading and reading ...

Is like AS3 ?

Java = AS3 ?

Thanks ... Fred Vianna
Trevor Coates
Posts: 2
Joined: April 23rd, 2009, 3:30 am

August 29th, 2010, 9:45 pm

Thanks for this great script.

Here is a something that I added to the script. It may be of use to someone.
It creates an Adjustment Layer with my favourite colour correction plug-ins attached. Nice!
- Curves
- Exposure
- Levels
- Hue/Saturation
- Vibrance

function ColCor(){
app.beginUndoGroup("ColCor");
if ((app.project.activeItem == null) || ((app.project.activeItem != null) && !(app.project.activeItem instanceof CompItem)))
{
}
else
{
var comp = app.project.activeItem;
var new_solid = comp.layers.addSolid([.5,.5,.5], "Colour Correction Layer", comp.width,comp.height,comp.pixelAspect,comp.duration); // add solid in  comp
  comp.layer(1).adjustmentLayer=true;
var layerCollection = comp.selectedLayers;
for (idx=0;idx<layerCollection.length;idx++)
{
layerCollection[idx].Effects.addProperty("Curves");
layerCollection[idx].Effects.addProperty("Exposure");
layerCollection[idx].Effects.addProperty("Levels");
layerCollection[idx].Effects.addProperty("Hue/Saturation");
layerCollection[idx].Effects.addProperty("Vibrance");
}

}
app.endUndoGroup();
}
Trevor Coates
Posts: 2
Joined: April 23rd, 2009, 3:30 am

August 30th, 2010, 1:38 am

Hi Again,

I have gone a bit further with this script and refined the Time Code button.
While at the same time answering an earlier question of how to you remove the black surrounding the text.

This version of the code:
- Creates an adjustment layer which is a black solid with the adjustment layer flag set to on
- Adds the Time Code effect
- Adds Knoll's free Unmult in this case the 64 bit version for CS5
I changed the name of my version from Unmult-64 to Unmult so it should work with the previous 32 bit version
http://redgiantsoftware.stores.yahoo.net/unmult.html
- Calculates comp size so that the text is centred and aligned with the bottom of the comp
- Sets the colour of the text to bright lime green if you don't like that colour then remember to specify normalised RGB (a number between 0.0 and 1.0)
tmcd.property("Text Color").setValue([0.376,1.0,0.0]);

To apply you need to activate the comp in the timeline and click the button T CD.
By default and if you have the Unmult effect the type will be burned into the image without the back background.

If you want to have time code burned into black background then turn off the Unmult effect and turn of the adjustment layer switch in the timeline.
Replace the entire existing function with the following and you are ready to go.

function TimeCode(){
app.beginUndoGroup("Timecode");
if ((app.project.activeItem == null) || ((app.project.activeItem != null) && !(app.project.activeItem instanceof CompItem)))
{
}
else
{
var comp = app.project.activeItem;
var new_solid = comp.layers.addSolid([.0,.0,.0], "Time Code Layer", comp.width,comp.height,comp.pixelAspect,comp.duration); // add solid in  comp
var layerCollection = comp.selectedLayers;
for (idx=0;idx<layerCollection.length;idx++)
{
var tmcd=layerCollection[idx].Effects.addProperty("Timecode");
var frmW=comp.width*0.5-70
var frmH=comp.height-58
tmcd.property("Time Units").setValue(25);
tmcd.property("Display Format").setValue(2);
tmcd.property("Text Position").setValue([frmW, frmH]);
tmcd.property("Text Size").setValue("36");
tmcd.property("Text Color").setValue([0.376,1.0,0.0]);
layerCollection[idx].Effects.addProperty("UnMult");

}
}
app.endUndoGroup();
}
Simma
Posts: 98
Joined: June 8th, 2010, 2:57 pm

August 31st, 2010, 7:25 am

This script is great! I still don't know much about scripting, but I managed to customize it how I wanted it, creating layers, running scripts etc. Timesaver! One thing though, I'm trying to add an image to the UI, but I can't figure out how to do it. Can anyone point me in the right direction?
fredvnn
Posts: 1
Joined: September 13th, 2010, 10:08 am

September 13th, 2010, 9:19 pm

I want to creat one palette like this, no with plugins or presets, but with this options :
new camera, layer, null, light, new project, new composition
and new adjustment layer ...

the world will be perfect with this !!!

How can i create this ?

I'm spending hous and hours and days reading the adobe script reference, but no sucess ...

Does anybody know the way to put this items in the tab, to after
effects cs5 for windows 7 64 bits ?

Thanks ...

Fred Vianna
ernpchan
Posts: 56
Joined: February 8th, 2010, 11:27 pm

September 16th, 2010, 9:37 am

Instead of calling the plug-in, call the command id of what you want to execute.

So to add an adjustment layer your function would look like this:

function AddAdjustmentLayer()
{
app.executeCommand(2279);
}
User avatar
lloydalvarez
Enhancement master
Posts: 460
Joined: June 17th, 2004, 9:27 am
Location: New York City, NY
Contact:

September 16th, 2010, 10:06 am

The app.executeCommand() is an unsupported function and is therefore not guaranteed to work in future versions. I would only use it when there is no other choice.
Creating an adjustment layer is easy using supported api methods:

Code: Select all

var newAdjLayer = app.project.item(index).layers.addSolid(color, name, width, height, pixelAspect, duration);
newAdjLayer.adjustmentLayer  = true; 
-Lloyd
ernpchan
Posts: 56
Joined: February 8th, 2010, 11:27 pm

September 16th, 2010, 10:34 am

Good to know. I guess if my version of the script breaks in the future I'll have to revisit it.
dterrell
Posts: 2
Joined: June 10th, 2010, 6:58 am
Location: Atlanta, GA

November 5th, 2010, 7:21 am

Guys-

The QUICK EFFECTS PALETTE is great. I have taken it and configured it to my own workflow, changing the buttons to efx that I use the most, but I am having trouble with one aspect. I have assigned a button to add LEVELS, s_Blur with 1 for the Blur amount and a CC Composite effect at 60% opacity. But I can't figure out how to make the CC Composite effect have an OVERLAY blend automatically set. My script portion is below:

Code: Select all

function CCBase(){
	app.beginUndoGroup("CCBase");
	if ((app.project.activeItem == null) || ((app.project.activeItem != null) && !(app.project.activeItem instanceof CompItem)))
		{
		}
	else
		{
				var comp = app.project.activeItem;
				var layerCollection = comp.selectedLayers;
				for (idx=0;idx<layerCollection.length;idx++)
					{
						layerCollection[idx].Effects.addProperty("Levels");
						var sBlur=layerCollection[idx].Effects.addProperty("s_Blur");
						sBlur.property("Blur Amount").setValue(1);
						var ccComposite=layerCollection[idx].Effects.addProperty("CC Composite");
						ccComposite.property("Opacity").setValue(60);
					}
		}
	app.endUndoGroup();
}	
I tried ccComposite.property("Composite Original").setValue(Overlay) - which is obviously incorrect because I keep getting an error. Can someone point me in the right direction.

Dwayne
Paul Tuersley
Posts: 704
Joined: June 5th, 2004, 7:59 am
Location: London, UK

November 5th, 2010, 9:28 am

Try this:

Code: Select all

ccComposite.property("Composite Original").setValue(18);
Think of the pulldown as an array of items starting with an index of 1 and including the separators as items. Overlay is the 18th item in the list.
dterrell
Posts: 2
Joined: June 10th, 2010, 6:58 am
Location: Atlanta, GA

November 5th, 2010, 10:37 am

Yes, yes, yes!!! Thank you, Paul. Much appreciated.

Dwayne
dude23
Posts: 1
Joined: November 30th, 2012, 5:42 am

December 3rd, 2012, 12:38 pm

Hi there,

i was wondering if this script is compatible with After Effects CS 5.5.

I had no Problem with installing the script and launching the new ui panel. All standart presets applied to the buttons are working fine aswell.
But when i try to add my animation presets to buttons, the script keeps crashing.
var But_18=["Front",
"preset",
"C:\Program Files\Adobe\Adobe After Effects CS5.5\Support Files\Presets\Zalando\Front.ffx"];


* this is the way i tryed to integrate my preset within the script. But when in try to launch this command, the Script Editor pops up and shows me an error for this line
layerCollection[idx].applyPreset(myPreset);


Could please someone of you guys tell me what i am doing wrong, or what else i have to do to assign my presets?
Thanks in advance !!!
cfx
Posts: 19
Joined: October 26th, 2009, 2:49 pm
Location: Next to Paris

December 4th, 2012, 4:08 pm

You should replace this "\" by this "/" in the path of your preset... 8)
Thanks Windows paths...

Fred
Post Reply