Search found 114 matches

by davestewart
January 12th, 2006, 12:32 pm
Forum: Expression Discussion
Topic: Layer Opacity based on Distance from camera
Replies: 1
Views: 8134

This will get you started

var maxDist=1000
var p1=thisComp.layer("Camera 1").position;
var p2=position;
var d=(length(p1,p2)/maxDist)

100-(100*d)

Cheers,
Dave
by davestewart
November 29th, 2005, 1:44 pm
Forum: Expression Discussion
Topic: Camera expression: delay time at each key frame?
Replies: 6
Views: 14468

Mooter, If I understand your question, what you want is to just expand (in time) your initial few keyframes to simulate a hold effect. If you want the hodl for each frame to be the same amount of time, it's fairly easy. Set your key frames, then ALT-Click the Stopwatch Icon and paste in this express...
by davestewart
November 12th, 2005, 4:55 am
Forum: Scripts Discussion
Topic: Change output module selected items
Replies: 2
Views: 7597

Not from the docs it can't. Why don't you try querying the .status attribute? var rq=app.project.renderQueue for(i=1;i<=rq.items.length;i++){ if(items[i].status==RQItemStatus.QUEUED){ //...apply function.... } } Not perfect, but will sort out any items that are ready to render... Cheers, Dave
by davestewart
October 14th, 2005, 4:30 am
Forum: Scripts Discussion
Topic: how to terminate the script?
Replies: 3
Views: 9159

No worries!

If you need to exit with an error code, or some other value, you can return a value:

Code: Select all

return myValue
For example:

Code: Select all

function myStuff(){
end=true
if(end==true)return "Script exited early!"
else return
}

var result=myStuff()
if(result!=undefined)alert(result)
Nice and easy!
by davestewart
October 13th, 2005, 7:48 am
Forum: Scripts Discussion
Topic: how to terminate the script?
Replies: 3
Views: 9159

If you code your script as a function, you can exit it by using "return" : // set the function up function myStuff(){ // do some stuff // maybe a loop or 2 if(error==true)return // return (ie, exit the function) if a condition is met } myStuff() // run the function Hope that helps :D
by davestewart
October 6th, 2005, 4:26 am
Forum: Script requests
Topic: continuously update text from a excel file
Replies: 6
Views: 13698

Ah, you can't do it with expressions. Actually, you could , but it woiuld be very slow, and cumbersome, and you'd need the data in arrays within the expression field, and with that amount of data I imagine that AE would crash anyway. The best way to do it is to learn to write scripts that read in th...
by davestewart
October 5th, 2005, 1:59 pm
Forum: Script requests
Topic: continuously update text from a excel file
Replies: 6
Views: 13698

Yeah, we used tab separated values for our last big data>ae thing. Had to make a new windows association (like CSV, but TSV) but it was great.

"\t" is the delimiter for tabs.

Just build a basic parsing engine, convert the data to arrays of objects, and you're laughing.
by davestewart
August 25th, 2005, 3:44 pm
Forum: General Scripts Library
Topic: Compify 720x486 -- update for AE7 to allow adding Presets
Replies: 18
Views: 54060

I might be missing something - but surely it would be easier to just stretch the item in the Output Module and save as a template?
by davestewart
August 18th, 2005, 3:32 pm
Forum: Scripts Discussion
Topic: Test for animated properties
Replies: 3
Views: 8764

Yeah, pretty much. I wrote some recursive functions a while back to list the properties, but due to how AE handles collections differently from case to case, they almost created as many problems as they solved! Mind you, it was a while ago, and I was only just getting to grips with the object model,...
by davestewart
August 17th, 2005, 12:29 pm
Forum: Scripts Discussion
Topic: Test for animated properties
Replies: 3
Views: 8764

Surely you just loop through the properties of the propertyGroup / numProperties an dtest each one, collecting the results in an array?
by davestewart
August 16th, 2005, 2:46 am
Forum: Script requests
Topic: Election Graphics
Replies: 7
Views: 16576

I've just done all the graphics for the Interactive TV service for the Beethoven Unvovered performances. The work took 3 months of development, scripting, production, and (re)-rendering. When we had the de-brief meeting with the Beeb the other day, one of the producers wanted to do the same thing ne...
by davestewart
August 10th, 2005, 6:44 pm
Forum: Script requests
Topic: Stack AErender tasks
Replies: 6
Views: 14982

Sorry - I got confused! -r runs a script file.

I thought you wanted to stack up script tasks.
by davestewart
August 9th, 2005, 6:00 pm
Forum: Script requests
Topic: Stack AErender tasks
Replies: 6
Views: 14982

Easiest to write a batch file I think... afterfx.exe -r "<your path 1>" afterfx.exe -r "<your path 2>" afterfx.exe -r "<your path 3>" I can only run one instance of afx at a time, so once it finishes it's render and exits, the next afx will start. Is this right, or am I...
by davestewart
August 2nd, 2005, 2:27 am
Forum: Scripts Discussion
Topic: cAPS lOCK nIGHTMARE
Replies: 4
Views: 10525

It's the way it's always been...!

You could convert the string to upper case using string.toUpperCase() afterwards...
by davestewart
July 31st, 2005, 3:56 pm
Forum: Scripts Discussion
Topic: creating files issues
Replies: 0
Views: 5864

creating files issues

Hi all, As part of a wider project, I need to know the time After Effects is started on each session. I was going to add a script to the startup folder that automatically creates a new file each time the app is run but have found a strange (windows?) problem... Run the following script a few times: ...