Search found 320 matches

by Dan Ebberts
July 1st, 2014, 7:11 pm
Forum: Expressions Library
Topic: How rgbToHsl really works ?
Replies: 4
Views: 25104

Re: How rgbToHsl really works ?

I think the luma/lightness channel is defined to be the average of the largest and smallest color channels. So pure red, blue or green would be 0.5 and white would be 1.0, etc.

Dan
by Dan Ebberts
March 6th, 2014, 1:08 am
Forum: Scripts Discussion
Topic: Get Source Filename
Replies: 2
Views: 8404

Re: Get Source Filename

This should work:

unescape(app.project.item(index).mainSource.file.name)


Dan
by Dan Ebberts
February 22nd, 2014, 2:22 pm
Forum: Scripts Discussion
Topic: Populating Comp A with 2 instances of Comp B
Replies: 2
Views: 8032

Re: Populating Comp A with 2 instances of Comp B

This isn't optimal, but it should give you the idea: var compA = compB = null; for (var i = 1; i <= app.project.numItems; i++){ if (app.project.item(i) instanceof CompItem){ if (app.project.item(i).name == "COMP.A") compA = app.project.item(i) else if (app.project.item(i).name == "COM...
by Dan Ebberts
January 21st, 2014, 2:49 pm
Forum: Expression Discussion
Topic: Preserve Initial Layer Position Prior to Wiggle
Replies: 4
Views: 17857

Re: Preserve Initial Layer Position Prior to Wiggle

To get to wiggle's 5th parameter (time--which is how you accomplish valueAtTime for wiggle), you have to specify something for the 3rd and 4th parameters (number of octaves and octave amplitude multiplier) so I just plug in the defaults (1 and .5).


Dan
by Dan Ebberts
January 21st, 2014, 2:27 pm
Forum: Expression Discussion
Topic: Preserve Initial Layer Position Prior to Wiggle
Replies: 4
Views: 17857

Re: Preserve Initial Layer Position Prior to Wiggle

This should work:

freq = .5;
amp = 100;
wiggle(freq,amp) - wiggle(freq,amp,1,.5,inPoint) + value


Dan
by Dan Ebberts
October 1st, 2013, 5:15 pm
Forum: Scripts Discussion
Topic: Different font styles in same string
Replies: 1
Views: 7017

Re: Different font styles in same string

No, unfortunately, all characters get the same font.
by Dan Ebberts
June 11th, 2013, 10:19 pm
Forum: Script requests
Topic: Select multiple layers from timeline
Replies: 2
Views: 9129

Re: Select multiple layers from timeline

Something like this:

Code: Select all

var myComp = app.project.activeItem;
for (var i = 1; i <= myComp.numLayers; i++){
  myComp.layer(i).selected = myComp.layer(i).inPoint > myComp.time;
}

Dan
by Dan Ebberts
May 21st, 2013, 10:17 am
Forum: Scripts Discussion
Topic: How to use Source Text property with Scripting?
Replies: 3
Views: 12779

Re: How to use Source Text property with Scripting?

I think you just need to remove the parentheses from length(). It's being interpreted as a function rather than a attribute.

Dan
by Dan Ebberts
April 15th, 2013, 1:06 pm
Forum: Scripts Discussion
Topic: Help adding expression and slider to all selected properties
Replies: 2
Views: 10252

Re: Help adding expression and slider to all selected proper

My initial advice would be to save the selected layers into a variable and the selected properties for each layer into an array, because creating anything can change the active selections.

Dan
by Dan Ebberts
March 22nd, 2013, 2:00 pm
Forum: Scripts Discussion
Topic: popup solid settings
Replies: 7
Views: 14079

Re: popup solid settings

If you have CS6, you can use the item.openInViewer() method. If you don't you'll have to use the undocumented ramPreviewTest() command hack (I think there's an example on this site somewhere).

Dan
by Dan Ebberts
March 14th, 2013, 10:30 pm
Forum: General Scripts Library
Topic: Create a motion path from a script?
Replies: 2
Views: 21249

Re: Create a motion path from a script?

I haven't tried it, but I'm guessing it would be possible by having the script issue menu commands combined with selecting/deselecting the appropriate properties. Pretty much mimicking the way you do it by hand. Depending on exactly what you're trying to do though, you might need AE CS6 so the scrip...
by Dan Ebberts
February 27th, 2013, 2:04 pm
Forum: Scripts Discussion
Topic: AE color window
Replies: 7
Views: 14037

Re: AE color window

Ah yes, sorry, you're right. I don't know how to at get the AE color picker.

Dan
by Dan Ebberts
February 26th, 2013, 8:06 pm
Forum: Scripts Discussion
Topic: AE color window
Replies: 7
Views: 14037

Re: AE color window

It's in the JavaScript Tools Guide:

$.colorPicker()

Dan
by Dan Ebberts
January 25th, 2013, 5:00 pm
Forum: Expression Discussion
Topic: distance from camera expression issues...
Replies: 9
Views: 23665

Re: distance from camera expression issues...

I think lights have included falloff since CS5.5, but if you have an earlier version, you could try something like this: decay = .005; noFalloff = 200; L = thisComp.layer("target"); p1 = L.toWorld(L.anchorPoint); p2 = toWorld([0,0,0]); d = length(p1,p2); if (d < noFalloff){ value; }else{ v...
by Dan Ebberts
December 19th, 2012, 11:28 am
Forum: Expression Discussion
Topic: 3d Point Control toComp
Replies: 4
Views: 13987

Re: 3d Point Control toComp

Is your layer with the circle comp-sized and centered in the comp? If not, I would think you'd have to do it this way: LE = thisComp.layer("LE"); fromComp(LE.toComp(LE.effect("3D Point Control")("3D Point"))); And your LE layer is 3D, correct? I just tried it and didn't...