Return-Path: Received: from mail-ob0-f182.google.com ([209.85.214.182] verified) by media-motion.tv (CommuniGate Pro SMTP 4.2.10) with ESMTP-TLS id 5180216 for AE-List@media-motion.tv; Mon, 19 Aug 2013 18:00:18 +0200 Received: by mail-ob0-f182.google.com with SMTP id wo10so5787033obc.13 for ; Mon, 19 Aug 2013 09:12:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=tbzc4saWnNVPKXnBF7bdfHMbuEeuaK0f4boqPdCsd1I=; b=j1e3u4H55xrzdCmeB8d0w2evCuS8ZBD5rTh/lpiEEVI+cAlQrASDzftzjsM7+tM09l BQdP1EcZ3Eit7LfL+eA7W4lhOZtl4mtc8sroF/YF/jwhu/V+mNRe3a37rhsmJJhuVg+N EI5/rax9j6SokahgsTwiUK86UJ86nKfJeiBKAfM427lWLc1wk6+hIqICuLcBaIppKhgl lKC6mIF2v0aZBAFtl5gBx1WujC2NIp0f380Srbh1Hcs49FNnEiynM0wTVoL1xIEcGHaC oveDtWh16Dj78Z9/UNYEGUXBebamn7BOb/8/LKmXTdvbUDFrR7odQLJibixcfhs99ZYG LryA== MIME-Version: 1.0 X-Received: by 10.50.2.99 with SMTP id 3mr3675006igt.51.1376928742761; Mon, 19 Aug 2013 09:12:22 -0700 (PDT) Received: by 10.50.16.148 with HTTP; Mon, 19 Aug 2013 09:12:22 -0700 (PDT) In-Reply-To: References: Date: Mon, 19 Aug 2013 11:12:22 -0500 Message-ID: Subject: Re: [AE] expression to check for a 3d layer From: Drew Gilmore To: After Effects Mail List Content-Type: multipart/alternative; boundary=089e0122e6e897f24f04e44f34cb --089e0122e6e897f24f04e44f34cb Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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) wr= ote: > You can check for a property only 3d Layers have, for example > var threeD =3D true; > try { > thisComp.layer("Control Layer").materialOption.ambient > } catch (err) { > //Not a 3D layer > threeD =3D 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=E8ne, ange sur terre] > ----------------------------------------- > www.mylenium.de > > > Drew Gilmore 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=3Deffect("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. > > www.newtonscannon.com > > > > > > > > > > > > > --089e0122e6e897f24f04e44f34cb Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Huh, an interesting omission... but the workaround wo= rks 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 e= xample
var threeD =3D true;
try {
<= span style=3D"white-space:pre-wrap"> thisComp.layer("Control La= yer").materialOption.ambient
} catch (err) {
//Not a 3D layer
threeD =3D false;
}

threeD is either 1 or 0 numerically.

regards,
Satya.
=20

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

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

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

=A0

=20

=A0

=20

=A0

=20
=20
=20
=20

=A0
=20
=20 =20 =20 =20
=20


--089e0122e6e897f24f04e44f34cb--