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
Search found 114 matches
- January 12th, 2006, 12:32 pm
- Forum: Expression Discussion
- Topic: Layer Opacity based on Distance from camera
- Replies: 1
- Views: 8175
- November 29th, 2005, 1:44 pm
- Forum: Expression Discussion
- Topic: Camera expression: delay time at each key frame?
- Replies: 6
- Views: 14525
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...
- November 12th, 2005, 4:55 am
- Forum: Scripts Discussion
- Topic: Change output module selected items
- Replies: 2
- Views: 7622
- October 14th, 2005, 4:30 am
- Forum: Scripts Discussion
- Topic: how to terminate the script?
- Replies: 3
- Views: 9185
No worries!
If you need to exit with an error code, or some other value, you can return a value:
For example:
Nice and easy!
If you need to exit with an error code, or some other value, you can return a value:
Code: Select all
return myValue
Code: Select all
function myStuff(){
end=true
if(end==true)return "Script exited early!"
else return
}
var result=myStuff()
if(result!=undefined)alert(result)
- October 13th, 2005, 7:48 am
- Forum: Scripts Discussion
- Topic: how to terminate the script?
- Replies: 3
- Views: 9185
- October 6th, 2005, 4:26 am
- Forum: Script requests
- Topic: continuously update text from a excel file
- Replies: 6
- Views: 13743
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...
- October 5th, 2005, 1:59 pm
- Forum: Script requests
- Topic: continuously update text from a excel file
- Replies: 6
- Views: 13743
- August 25th, 2005, 3:44 pm
- Forum: General Scripts Library
- Topic: Compify 720x486 -- update for AE7 to allow adding Presets
- Replies: 18
- Views: 54380
- August 18th, 2005, 3:32 pm
- Forum: Scripts Discussion
- Topic: Test for animated properties
- Replies: 3
- Views: 8795
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,...
- August 17th, 2005, 12:29 pm
- Forum: Scripts Discussion
- Topic: Test for animated properties
- Replies: 3
- Views: 8795
- August 16th, 2005, 2:46 am
- Forum: Script requests
- Topic: Election Graphics
- Replies: 7
- Views: 16638
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...
- August 10th, 2005, 6:44 pm
- Forum: Script requests
- Topic: Stack AErender tasks
- Replies: 6
- Views: 15050
- August 9th, 2005, 6:00 pm
- Forum: Script requests
- Topic: Stack AErender tasks
- Replies: 6
- Views: 15050
- August 2nd, 2005, 2:27 am
- Forum: Scripts Discussion
- Topic: cAPS lOCK nIGHTMARE
- Replies: 4
- Views: 10562
- July 31st, 2005, 3:56 pm
- Forum: Scripts Discussion
- Topic: creating files issues
- Replies: 0
- Views: 5949
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: ...