Linking Multiple Cameras Across PreComped Layers

Moderators: Disciple, zlovatt

Post Reply
theatomicwonder
Posts: 3
Joined: October 17th, 2008, 4:39 pm

I recently had a project that required pre-comping duplicates of my camera several times. The problem was that it would take several minutes to go through them all if I had to change the camera animation. Is there a way to parent, or clone objects [especially cameras] over several compositions, so that when you change the master, the children change too?
Paul Tuersley
Posts: 704
Joined: June 5th, 2004, 7:59 am
Location: London, UK

Let's say your main camera is in a comp called "Master Comp". On a new camera in a different comp you need to add expressions to all the properties you want to link. So for example, add an expression to Position and add this at the start of the expression:
comp("Master Comp").activeCamera.
so it reads:
comp("Master Comp").activeCamera.transform.position

Then repeat with any other properties that you're changing.

You can link to a specific camera by using this instead:
comp("Master Comp").layer("name of the camera").transform.position
but by using "activeCamera" it will link to whichever camera is currently active in your master comp.

One other thing. If you're going to enable motion blur, make sure the in/out points of the master camera layer extend beyond the first/last frame of the comp, otherwise you'll probably get an error and the expressions will be disabled.

Paul
theatomicwonder
Posts: 3
Joined: October 17th, 2008, 4:39 pm

Paul, thank you so much. This works beautifully.
Am I right to assume that this can be applied to other objects besides cameras?
How would I word the expression to link effects?

Many Thanks
Dan
Paul Tuersley
Posts: 704
Joined: June 5th, 2004, 7:59 am
Location: London, UK

You can link most properties just by dragging the expression pickwhip (the spiral icon that appears when you add an expression) onto another property. AE will automatically generate the correct expression text.

Also, I've written a script that will automatically add the expressions needed to create linked effects:
viewtopic.php?f=9&t=32

Paul
theatomicwonder
Posts: 3
Joined: October 17th, 2008, 4:39 pm

Thanks again. I knew about the expression pickwip, but until I read about your script, I never realized that you can use it across open timelines. It seems so obvious, I can't believe I never tried it before. I also downloaded your script. I know I'll need it soon.

Dan
Post Reply