Search found 320 matches

by Dan Ebberts
September 22nd, 2006, 10:14 am
Forum: Expression Discussion
Topic: stamp info on frame
Replies: 3
Views: 9975

Try applying this expression to the Source Text property of a text layer: "comp width: " + thisComp.width + "\r" + "comp height: " + thisComp.height + "\r" + "pixel aspect: " + thisComp.pixelAspect + "\r" + "frame rate: " + 1/this...
by Dan Ebberts
August 11th, 2006, 10:03 am
Forum: Expression Discussion
Topic: springy expression
Replies: 15
Views: 52493

This should eliminate the parenting issue: P = thisComp.layer("leader").position; n = 0; if (P.numKeys > 0){ n = P.nearestKey(time).index; if (P.key(n).time > time){ n--; } } if (n == 0){ t = 0; }else{ t = time - P.key(n).time; } if (n > 0){ v = P.velocityAtTime(P.key(n).time - thisComp.fr...
by Dan Ebberts
August 11th, 2006, 8:10 am
Forum: Expression Discussion
Topic: springy expression
Replies: 15
Views: 52493

Try this one: n = 0; if (numKeys > 0){ n = nearestKey(time).index; if (key(n).time > time){ n--; } } if (n == 0){ t = 0; }else{ t = time - key(n).time; } if (n > 0){ v = velocityAtTime(key(n).time - thisComp.frameDuration/10); amp = .05; freq = 4.0; decay = 2.0; value + v*amp*Math.sin(freq*t*2*Math....
by Dan Ebberts
July 8th, 2006, 4:03 pm
Forum: Scripts Discussion
Topic: writing render queue text file
Replies: 1
Views: 6680

Those attributes don't appear to be accessible to scripting. They're not listed in the Scripting Guide.

Dan
by Dan Ebberts
May 19th, 2006, 10:38 pm
Forum: Expression Discussion
Topic: date?
Replies: 8
Views: 18050

This is most bizarre. According to my JavaScript reference, there is a Date() function (which returns a string) and a Date() constructor that returns a date object (with which you can use the Date() methods, like getDay(), getFullYear(), etc) Using either of these with no parameters is supposed to g...
by Dan Ebberts
May 19th, 2006, 6:36 pm
Forum: Expression Discussion
Topic: date?
Replies: 8
Views: 18050

Wow - I didn't know that would work (sorry Lloyd). I've got to run, but I'll play around with this later. Thanks!

Dan
by Dan Ebberts
May 19th, 2006, 12:53 pm
Forum: Expression Discussion
Topic: displacement in 3 d
Replies: 7
Views: 16005

vranan,

There's a tutorial on a nice work-around for the particles-always-facing-the-camera issue here;

http://www.graymachine.com/tutorials/

Dan
by Dan Ebberts
May 19th, 2006, 12:48 pm
Forum: Expression Discussion
Topic: date?
Replies: 8
Views: 18050

I don't think so Lloyd. You can use the Date methods to format and manipulate a date (that you supply), but you can't get at the system date/time.

Dan
by Dan Ebberts
May 17th, 2006, 5:52 pm
Forum: Expression Discussion
Topic: Attaching a comma... ?
Replies: 4
Views: 10546

This seems to work:

myStr = "" + Math.round(effect("Slider Control")("Slider"));
if (myStr.length > 3){
myStr.substr(0,myStr.length-3) + "," + myStr.substr(-3)
}else{
myStr
}

Dan
by Dan Ebberts
April 7th, 2006, 9:17 am
Forum: Expression Discussion
Topic: function in a null layer
Replies: 4
Views: 11004

No, expressions can't read text files. You'd have to write a script that would read the text file and update your expressions.

Dan
by Dan Ebberts
April 7th, 2006, 7:00 am
Forum: Expression Discussion
Topic: function in a null layer
Replies: 4
Views: 11004

No, an expression can't call an external function. However, you have some options. You can change the expression in one layer and the use Edit>Copy Expression Only and then paste it into the other layers. Or, you could write a script that modifies the expressions for all the layers at once based on ...
by Dan Ebberts
April 4th, 2006, 3:10 pm
Forum: Expression Discussion
Topic: Save a time value
Replies: 17
Views: 29255

That's a pretty cool effect Byron. I like it!

Dan
by Dan Ebberts
April 4th, 2006, 2:24 pm
Forum: Expression Discussion
Topic: Save a time value
Replies: 17
Views: 29255

You know - I think you're back to your original problem. You need to know when your time remapped layer got depositied at it's position and I don't think there's a straight forward way to calculate it. The only way I can think of to do it is to loop back through time to find out how long it's been i...
by Dan Ebberts
April 4th, 2006, 1:18 pm
Forum: Expression Discussion
Topic: Save a time value
Replies: 17
Views: 29255

How is the time offset supposed to work?

Dan
by Dan Ebberts
April 4th, 2006, 7:54 am
Forum: Expression Discussion
Topic: Save a time value
Replies: 17
Views: 29255

I think a combination of what you have here and the method I described will solve your spacing problem. The key is to use roving keyframes just to trace out the path, but then you use the travel slider to control the speed and direction of your leader and the depositing of the followers. The timing ...