From: "Dan Ebberts" Received: from resqmta-ch2-02v.sys.comcast.net ([69.252.207.34] verified) by media-motion.tv (CommuniGate Pro SMTP 6.1.0) with ESMTPS id 7231207 for ae-list@media-motion.tv; Wed, 16 Jan 2019 22:02:34 +0100 Received: from resomta-ch2-15v.sys.comcast.net ([69.252.207.111]) by resqmta-ch2-02v.sys.comcast.net with ESMTP id jmbHgPGRj9VLojsTeg2oVE; Wed, 16 Jan 2019 21:11:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20161114; t=1547673118; bh=opc+xDWT8Qcje8VcLYkil9JjZCKvOV01DpKFLlswpEc=; h=Received:Received:From:To:Subject:Date:Message-ID:MIME-Version: Content-Type; b=fNctopspKay/TnWTf805a/ZjbYXzunVzGnPFhefUPUYjl1nZbVI8LJwJlPHepU8tf SYVA4SCxqjcLrX25gd7d48Syt0vGKD8E6UilAtPPICCMVhnfnEuGXBC11QdiO3kPWZ 110RoMUDd3miSyrkOpshAsZRgewSqf15OmMiB6pVvrTehE3rRwmHADpR1X4+Z8OkeW wzwPI289ZDIJ7F7hCS8qbFwDh5qpJTcA3NdvoSVwsR5oSl6V4I5lpWpGOu+QNYPN72 YZcg83CDICD2Dl00oxcUCMElM6ShgM/A2Sb+wiVXpp4U5NN8kHS9MQAe1sqYqJ9PTW 3aJyvio3yHmNg== Received: from HPZ440 ([71.197.106.61]) by resomta-ch2-15v.sys.comcast.net with ESMTPSA id jsTdg89KanyP6jsTdgwkz7; Wed, 16 Jan 2019 21:11:58 +0000 X-Xfinity-VAAS: gggruggvucftvghtrhhoucdtuddrgedtledrgeehgddugeekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuvehomhgtrghsthdqtfgvshhipdfqfgfvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfhfjgfufffkgggtofhtsegrtdhgpedvtdejnecuhfhrohhmpedfffgrnhcugfgssggvrhhtshdfuceouggvsggsvghrthhssegtohhmtggrshhtrdhnvghtqeenucfkphepjedurdduleejrddutdeirdeiudenucfrrghrrghmpehhvghlohepjffrkgeggedtpdhinhgvthepjedurdduleejrddutdeirdeiuddpmhgrihhlfhhrohhmpeguvggssggvrhhtshestghomhgtrghsthdrnhgvthdprhgtphhtthhopegrvgdqlhhishhtsehmvgguihgrqdhmohhtihhonhdrthhvnecuvehluhhsthgvrhfuihiivgeptd X-Xfinity-VMeta: sc=0;st=legit To: "'After Effects Mail List'" References: In-Reply-To: Subject: RE: [AE] sourceRectAtTime() on 3D layers Date: Wed, 16 Jan 2019 13:11:56 -0800 Message-ID: <008301d4ade0$1d8b3950$58a1abf0$@comcast.net> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0084_01D4AD9D.0F68BCA0" X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQC8jfTeQ7XFG4FmBJHFPdUdmHBxVqfio13A Content-Language: en-us This is a multipart message in MIME format. ------=_NextPart_000_0084_01D4AD9D.0F68BCA0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Depending on what's happening in your comp, your corner values, derived = from toComp() could be changing. Again depending on what you're doing, = toWorld() might work better. =20 Dan =20 From: After Effects Mail List =20 Sent: Wednesday, January 16, 2019 12:46 PM To: After Effects Mail List Subject: [AE] sourceRectAtTime() on 3D layers =20 I have a null that is being scaled by a text layer's bounding box. It's = working fine in 2D space. However I just changed the layers to 3D and = tried to animate and I'm getting some problems. I am trying to use a = marker to tell it when to pull the sourceRect. I've put that marker = after the animation is over and the text is squared up. However, as the = text moves I'm seeing some motion on the scale values. I thought the = sourceRect function was supposed to only pull from the value you = supplied in the time value? =20 =20 L=3D effect("Text layer 1")("Layer"); //layer choice comes from the drop = down tM =3D thisLayer.marker.key(1).time; //get the time from the marker on = when to sample the bounding box R=3DL.sourceRectAtTime(tM, true); //get the rect extraScale =3D effect("ExtraScale")("Slider"); //log all the corners UL =3D L.toComp([R.left,R.top]); UR =3D L.toComp([R.left+R.width,R.top]); LR =3D L.toComp([R.left+R.width,R.top+R.height]); LL =3D L.toComp([R.left,R.top+R.height]); maxX =3D Math.max(UL[0],UR[0],LR[0],LL[0]); minX =3D Math.min(UL[0],UR[0],LR[0],LL[0]); maxY =3D Math.max(UL[1],UR[1],LR[1],LL[1]); minY =3D Math.min(UL[1],UR[1],LR[1],LL[1]); =20 tS =3D (maxX-minX) / (100 / L.transform.scale[0]); //width guide null layer gWidth =3D thisComp.layer("width guide").transform.scale[0]; x =3D transform.scale[0]; =20 if (tS > gWidth){ //get the parent scale if there is one oS =3D tS; }else{oS =3D gWidth} =20 =20 o =3D gWidth / oS; x =3D x * o ; [x + extraScale, x + extraScale] ------=_NextPart_000_0084_01D4AD9D.0F68BCA0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Depending on what's happening in your comp, your = corner values, derived from toComp() could be changing. Again depending = on what you're doing, toWorld() might work better.

 

Dan

 

From: = After Effects Mail List <AE-List@media-motion.tv>
Sent: = Wednesday, January 16, 2019 12:46 PM
To: After Effects Mail = List <AE-List@media-motion.tv>
Subject: [AE] = sourceRectAtTime() on 3D layers

 

I have = a null that is being scaled by a text layer's bounding box. It's working = fine in 2D space. However I just changed the layers to 3D and tried to = animate and I'm getting some problems. I am trying to use a marker to = tell it when to pull the sourceRect. I've put that marker after the = animation is over and the text is squared up. However, as the text moves = I'm seeing some motion on the scale values. I thought the sourceRect = function was supposed to only pull from the value you supplied in the = time value?

 

 

L=3D effect("Text layer = 1")("Layer"); //layer choice comes from the drop = down

tM =3D = thisLayer.marker.key(1).time; //get the time from the marker on when to = sample the bounding box

R=3DL.sourceRectAtTime(tM, true); //get the = rect

extraScale =3D = effect("ExtraScale")("Slider");

=

  //log all the = corners

UL =3D = L.toComp([R.left,R.top]);

UR =3D = L.toComp([R.left+R.width,R.top]);

LR =3D = L.toComp([R.left+R.width,R.top+R.height]);

LL =3D = L.toComp([R.left,R.top+R.height]);

maxX =3D = Math.max(UL[0],UR[0],LR[0],LL[0]);

minX =3D = Math.min(UL[0],UR[0],LR[0],LL[0]);

maxY =3D = Math.max(UL[1],UR[1],LR[1],LL[1]);

minY =3D = Math.min(UL[1],UR[1],LR[1],LL[1]);

  

tS =3D (maxX-minX) / (100 / = L.transform.scale[0]);

//width guide null = layer

gWidth =3D = thisComp.layer("width = guide").transform.scale[0];

x = =3D transform.scale[0];

 

=C2=A0=C2=A0=C2=A0=C2=A0 if (tS > gWidth){ //get the = parent scale if there is one

=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 oS =3D tS;

=C2=A0=C2=A0=C2=A0=C2=A0 }else{oS =3D = gWidth}

 

=C2=A0=C2=A0=C2=A0=C2=A0 =

=C2=A0=C2=A0=C2=A0=C2=A0 = o =3D gWidth / oS;

=C2=A0=C2=A0=C2=A0=C2=A0 x =3D x * o = ;

[x + extraScale, x + = extraScale]

------=_NextPart_000_0084_01D4AD9D.0F68BCA0--