Search found 320 matches

by Dan Ebberts
April 24th, 2011, 8:19 pm
Forum: Script requests
Topic: Remove All Effects fro all Layers
Replies: 3
Views: 14872

Re: Remove All Effects fro all Layers

It you're trying to remove the Effects property group rather than the individual effects. You might have more luck with this: { var myComp = app.project.activeItem; var myEffects; for (var i = 1; i <= myComp.numLayers; i++){ try{ myEffects = myComp.layer(i).Effects; for (j = myEffects.numProperties;...
by Dan Ebberts
April 19th, 2011, 5:58 pm
Forum: Scripts Discussion
Topic: set a new activeItem for {app.executeCommand()}
Replies: 11
Views: 19308

Re: set a new activeItem for {app.executeCommand()}

It's been a while since I've done it, but I would expect the scale to not affect the width from sourceRectAtTime(). This is because you're scaling the layer, but you're measuring the layer's source. You should be able apply the same scale factor to the width value to come up with the adjusted value....
by Dan Ebberts
April 10th, 2011, 9:55 pm
Forum: Expression Discussion
Topic: why doesn't this work?
Replies: 10
Views: 18322

Re: why doesn't this work?

>Would this be the place to use the while statement? I can't think of any way that would help you. There are a number of options. One would be to isolate the wiggle like this: x = value[0]; w = wiggle(2,200) - value; if(time > 1 && time < 3){ ease(time,1,3,[457,366],[1040,366]) }else if( tim...
by Dan Ebberts
April 10th, 2011, 8:08 pm
Forum: Expression Discussion
Topic: why doesn't this work?
Replies: 10
Views: 18322

Re: why doesn't this work?

>meaning that I'm adding noting to [x] and adding the variable to y? Yes - that's it. I think your latest expression should look more like this: x = value[0]; w = wiggle(2,200); if(time > 1 && time < 3){ ease(time,1,3,[457,366],[1040,366]) }else if( time >3 && time < 5){ [x,w[1]] }el...
by Dan Ebberts
April 10th, 2011, 6:46 pm
Forum: Expression Discussion
Topic: why doesn't this work?
Replies: 10
Views: 18322

Re: why doesn't this work?

wiggle generates an array, so if you only want 1 dimension wiggled, you split it out (as w[1] for y, in this case).

Try this:

Code: Select all

w = Math.sin(time*4)*25;
x = value[0];

if ( x > 200 && x < 500){
 value + [0,w]
}else{
  value
}

Dan
by Dan Ebberts
April 10th, 2011, 5:53 pm
Forum: Expression Discussion
Topic: why doesn't this work?
Replies: 10
Views: 18322

Re: why doesn't this work?

I think this is closer to your original idea:

Code: Select all

w = wiggle(2,45);
x = value[0];
if ( x > 200 && x < 500){
 [x,w[1]] 
}else{
 value
}
Dan
by Dan Ebberts
April 10th, 2011, 4:56 pm
Forum: Expression Discussion
Topic: why doesn't this work?
Replies: 10
Views: 18322

Re: why doesn't this work?

What are you trying to do, exactly? There are a lot of problems with your expression. For example: The wiggle is not used at all. Your ease should look more like this: ease(time,2,outPoint,[640,400],[640,200]) The ease isn't compatible with the last statement ([x,y]) be cause ease generates an array...
by Dan Ebberts
April 2nd, 2011, 10:18 am
Forum: Scripts Discussion
Topic: free for you! movie barcode generator
Replies: 4
Views: 15433

Re: free for you! movie barcode generator

This seems like it might be a good job for Pixel Bender. Here's a simple one-pixel slice with a control to let you set the y position for the sample: <languageVersion : 1.0;> kernel BarCode < displayname : "Bar Code"; category : "Pixel Bender Effects"; namespace : "AfterEffe...
by Dan Ebberts
February 16th, 2011, 3:40 pm
Forum: Expression Discussion
Topic: source text and layers/pre-comps
Replies: 2
Views: 9678

Re: source text and layers/pre-comps

Sure. Here's an opacity expression that would make a layer invisible unless the first character of the text in "My Text Layer" is "A":

txt = thisComp.layer("My Text Layer").text.sourceText;
txt[0] == "A" ? 100 : 0


Dan
by Dan Ebberts
January 3rd, 2011, 7:14 pm
Forum: Scripts Discussion
Topic: file Object
Replies: 3
Views: 8420

Re: file Object

You have to specify the whole path:

var myFilePath = "C:/Temp";
var myFileName = "test.txt";

var myFile = new File(myFilePath + "/" + myFileName);
var fileOK = myFile.open("r");


Dan
by Dan Ebberts
December 28th, 2010, 4:05 pm
Forum: Scripts Discussion
Topic: Searching for a string in an external file
Replies: 15
Views: 25248

Re: Searching for a string in an external file

Did you try the binary encoder?

QT.encoding = "binary";


Dan
by Dan Ebberts
December 16th, 2010, 11:44 pm
Forum: Scripts Discussion
Topic: problems with new line character in a text file on Windows
Replies: 2
Views: 7517

Re: problems with new line character in a text file on Windo

If I run this on a Mac and open the result in Win Notepad, I don't get any strange characters: { var myOutputFolder = Folder.selectDialog("Please navigate to output folder."); var myFilePath = myOutputFolder.path + "/" + myOutputFolder.name + "/" + "test.txt";...
by Dan Ebberts
November 14th, 2010, 5:02 pm
Forum: Scripts Discussion
Topic: how to semplify presets
Replies: 5
Views: 11293

Re: how to semplify presets

My guess would be that maybe you didn't get the XML quite right. What did you add to the file?

Dan
by Dan Ebberts
November 14th, 2010, 2:05 pm
Forum: Scripts Discussion
Topic: how to semplify presets
Replies: 5
Views: 11293

Re: how to semplify presets

What happened when you tried it?

Dan
by Dan Ebberts
November 14th, 2010, 10:42 am
Forum: Scripts Discussion
Topic: how to semplify presets
Replies: 5
Views: 11293

Re: how to semplify presets