Mailing List AE-List@media-motion.tv ? Message #50523
From: Drew Gilmore <dotsandlines@gmail.com>
Subject: Re: [AE] expression to check for a 3d layer
Date: Mon, 19 Aug 2013 11:12:22 -0500
To: After Effects Mail List <AE-List@media-motion.tv>
Huh, an interesting omission... but the workaround works perfectly. Thanks to both of you!

Drew


On Mon, Aug 19, 2013 at 8:55 AM, Satya G Meka (Lists) <lists@rowbyte.com> wrote:
You can check for a property only 3d Layers have, for example
var threeD = true;
try {
thisComp.layer("Control Layer").materialOption.ambient
} catch (err) {
//Not a 3D layer
threeD = false;
}

threeD is either 1 or 0 numerically.

regards,
Satya.

On Monday, August 19, 2013 at 6:44 AM, mylenium@mylenium.de wrote:

Unfortunately there is no built-in method to check for that. you will have to tag your layers somehow by naming them suitably or applying a specificalyl named dummy effect that can be searched for.
 
Mylenium
 
[Pour Mylène, ange sur terre]
-----------------------------------------
www.mylenium.de
 
Drew Gilmore <dotsandlines@gmail.com> hat am 19. August 2013 um 15:09 geschrieben:

I'm trying to write an expression that checks if a layer (specified by a layer expression control) has its 3D layer switch on.
 
L=effect("Layer Control")("Layer");
if ( L.threeDLayer)   { //do something };
 
But I get the error "Class 'Layer' has no property or method named 'threeDLayer'".
 
I've checked all over for an example, and can't find anything that doesn't look like this. I'm sure I'm missing something simple and object-oriented...
 
Drew
--
Drew Gilmore
Just a guy made of dots and lines.
 
 

 

 

 


 


 
Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to ListMaster