Return-Path: Received: from mail-pd0-f170.google.com ([209.85.192.170] verified) by media-motion.tv (CommuniGate Pro SMTP 4.2.10) with ESMTP-TLS id 5180072 for AE-List@media-motion.tv; Mon, 19 Aug 2013 15:43:03 +0200 Received: by mail-pd0-f170.google.com with SMTP id x10so5275085pdj.29 for ; Mon, 19 Aug 2013 06:55:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:date:from:to:message-id:in-reply-to:references :subject:mime-version:content-type; bh=jHWMVctXf9wYKgEcZXm3qoB8ngTObGQg7kTz3SYFcvE=; b=f7WICXMR+lUs6AOCeqqRGmyMmi+ksnrJspbke/3uWYN6soZ+bQo/e5gvmk1tA6Z+ZU SRBW+ILKqINVsCkQPRbJdyLj1u5NMIE2mKoYBZ/ho/sGnWzoJtwp/d9zPflIr1i+OSD5 x0O2VIZiD3sbXVqQsMG1zCzVafhm4iDMLRJLVF6kyrXT/QDzzQI97Dllvel/uKRjU5Iu zsSrBMPPvPvCkxtL/A74NfqFoeDM0SStoMJo3+t+LBnH1SlIGv6NWcDbckYFYqfeqJXK TiBMu+pUxg1ezxjYIkoXe+/phL0PUEu1CIgJaSpToBZe7rtZQEbkmJ+I7wtGHJAyxDEV tqgA== X-Gm-Message-State: ALoCoQkgnFVVcpSnUBPFrTXa4ZeCuHSLcEyutw7Vqg2J923TVmCDpB5kgS5t4B79jzmdYH/XcywZ X-Received: by 10.68.178.133 with SMTP id cy5mr17383365pbc.110.1376920507956; Mon, 19 Aug 2013 06:55:07 -0700 (PDT) Return-Path: Received: from [192.168.1.146] (75-175-6-210.ptld.qwest.net. [75.175.6.210]) by mx.google.com with ESMTPSA id z14sm15344792pbt.0.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 19 Aug 2013 06:55:07 -0700 (PDT) Date: Mon, 19 Aug 2013 06:55:05 -0700 From: "Satya G Meka (Lists)" To: After Effects Mail List , "=?utf-8?Q?mylenium=40mylenium.de?=" Message-ID: <93DE3CF0392340BC9444CCCC2447B1A5@rowbyte.com> In-Reply-To: References: Subject: Re: [AE] expression to check for a 3d layer X-Mailer: sparrow 1.6.4 (build 1178) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="521223b9_488ac1a_8faa" --521223b9_488ac1a_8faa Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline You can check for a property only 3d Layers have, for example =20 var threeD =3D true; try =7B thisComp.layer(=22Control Layer=22).materialOption.ambient =7D catch (err) =7B //Not a 3D layer threeD =3D false; =7D threeD is either 1 or 0 numerically. regards, Satya. On Monday, August 19, 2013 at 6:44 AM, mylenium=40mylenium.de wrote: > Unfortunately there is no built-in method to check for that. you will h= ave to tag your layers somehow by naming them suitably or applying a spec= ificalyl named dummy effect that can be searched for. =20 > =20 > Mylenium =20 > =20 > =5BPour Myl=C3=A8ne, ange sur terre=5D =20 > ----------------------------------------- =20 > www.mylenium.de (http://www.mylenium.de) =20 > =20 > > Drew Gilmore hat am 19. August 2013 um 15:09 geschrieben: =20 > > =20 > > I'm trying to write an expression that checks if a layer (specified b= y a layer expression control) has its 3D layer switch on. =20 > > =20 > > L=3Deffect(=22Layer Control=22)(=22Layer=22); =20 > > if ( L.threeDLayer) =7B //do something =7D; =20 > > =20 > > But I get the error =22Class 'Layer' has no property or method named = 'threeDLayer'=22. =20 > > =20 > > I've checked all over for an example, and can't find anything that do= esn't look like this. I'm sure I'm missing something simple and object-or= iented... =20 > > =20 > > Drew =20 > > -- =20 > > Drew Gilmore =20 > > Just a guy made of dots and lines. =20 > > =20 > > www.newtonscannon.com (http://www.newtonscannon.com) =20 > > =20 > > =20 > > =20 > > =20 > > =20 > > =20 > > =20 > > =20 > =20 > =20 > =20 --521223b9_488ac1a_8faa Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
You can check for a property only 3d Layers have, for= example
var threeD =3D true;
try =7B
thisComp.layer(=22Control Layer=22).materialOption.ambient
=7D= catch (err) =7B
//Not a 3D layer
threeD =3D false;
=7D

threeD is either 1 or 0 numerically= .

regards,
Satya.
=20

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

=20 =20 =20 =20 =20
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 spe= cificalyl named dummy effect that can be searched for.
=20
 
=20
Mylenium
=20
 
=20
=5BPour Myl=C3=A8ne, ange sur terre=5D
-----------------------------------------
www.mylenium.de
=20
 
Drew Gilmore <dotsa= ndlines=40gmail.com> hat am 19. August 2013 um 15:09 geschrieben:

=20
I'm trying to write an expression that checks if a layer (specified b= y a layer expression control) has its 3D layer switch on. =20
 
=20
=20
L=3Deffect(=22Layer Control=22)(=22Layer=22);
=20
if ( L.threeDLayer)   =7B //do something =7D;
=20
 
=20
But I get the error =22Class 'Layer' has no property or method name= d 'threeDLayer'=22.
=20
 
=20
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 ob= ject-oriented...
=20
 
=20
Drew
=20
--
=20
Drew Gilmore
=20
Just a guy made of dots and lines.
=20
 
=20 =20
 
=20
=20

 

=20

 

=20

 

=20
=20
=20
=20
=20
=20 =20 =20 =20
=20

--521223b9_488ac1a_8faa--