Hey all, so I'm wondering if this is even possible, but...
Is there a way to choose the active camera of a precomp via an expression?
Say for example, you have a comp with 2 or more cameras in it. You bring that comp into another main comp, effectively making the comp with all the cameras in it a precomp.
Is there an expression (or script) that you can apply to the precomp, to force it to look through or make active a specific one of the cameras within the precomp?
So basically, within the main comp, you can have 2 or more copies of the precomp, but all the precomps are looking through different cameras?
______________________________
-Cameras_precomp
Camera1
Camera2
-Main_comp
Cameras_precomp (...expression to look through "Camera1 in Cameras_precomp"?)
Cameras_precomp (...expression to look through "Camera2" in Cameras_precomp?)
_______________________________
Any help with this would be greatly appreciated!
Thanks,
Dan
Choosing active camera of precomp?
- lloydalvarez
- Enhancement master
- Posts: 460
- Joined: June 17th, 2004, 9:27 am
- Location: New York City, NY
- Contact:
Code: Select all
thisComp.activeCamera
-
- Posts: 2
- Joined: April 15th, 2010, 2:11 pm
Thanks Lloyd! Awesome scripts on aescripts BTW!
But is there a way to control which camera is active from a different comp? Or choose which camera is active within a precomp?
Basically I am trying to come up with an easy way to do stereoscopic anaglyphics that is easily previewable, within AE. So, here are how my ideal comps/layers would be setup:
-CameraComp
---CameraCenter (used to animate scene, with expression attaching point of interest to Null)
---CameraLeftEye (parented to CameraCenter, with expression attached to a slider that automatically moves farther left of CameraCenter's position, and expression to attach point of interest to Null for convergence point)
---CameraRightEye (parented to CameraCenter, with expression attached to a slider that automatically moves farther right of CameraCenter's position, and expression to attach point of interest to Null for convergence point)
---Null (3D, that would be the target for the convergence point)
---Solid (invisible to scene, with slider controlling distance between left and right)
---all the animation and misc layers below
-MainComp
---Solid (with 3Dglasses plugin, setting first 'cameracomp' below to left eye and second 'cameracomp' to right eye
---CameraComp (with expression using "CameraLeftEye" to process precomp)
---CameraComp (with expression using "CameraRightEye" to process precomp)
I am vet. after effects user, but quite a noob to expressions/scripting. So not sure if this is even possible. But good to ask an expert like you.
What would be even more amazing is if all this could be done in one comp... But I don't think that possible with the order in which after effects processes layers/cameras/etc.
Thanks,
Dan.
But is there a way to control which camera is active from a different comp? Or choose which camera is active within a precomp?
Basically I am trying to come up with an easy way to do stereoscopic anaglyphics that is easily previewable, within AE. So, here are how my ideal comps/layers would be setup:
-CameraComp
---CameraCenter (used to animate scene, with expression attaching point of interest to Null)
---CameraLeftEye (parented to CameraCenter, with expression attached to a slider that automatically moves farther left of CameraCenter's position, and expression to attach point of interest to Null for convergence point)
---CameraRightEye (parented to CameraCenter, with expression attached to a slider that automatically moves farther right of CameraCenter's position, and expression to attach point of interest to Null for convergence point)
---Null (3D, that would be the target for the convergence point)
---Solid (invisible to scene, with slider controlling distance between left and right)
---all the animation and misc layers below
-MainComp
---Solid (with 3Dglasses plugin, setting first 'cameracomp' below to left eye and second 'cameracomp' to right eye
---CameraComp (with expression using "CameraLeftEye" to process precomp)
---CameraComp (with expression using "CameraRightEye" to process precomp)
I am vet. after effects user, but quite a noob to expressions/scripting. So not sure if this is even possible. But good to ask an expert like you.

What would be even more amazing is if all this could be done in one comp... But I don't think that possible with the order in which after effects processes layers/cameras/etc.
Thanks,
Dan.
- lloydalvarez
- Enhancement master
- Posts: 460
- Joined: June 17th, 2004, 9:27 am
- Location: New York City, NY
- Contact:
Not sure I follow your question 100% but you can trim your camera layers to change which camera is the active camera in the comp.
-Lloyd
-Lloyd