From: "Byron Nash" Received: from mail-qt1-f182.google.com ([209.85.160.182] verified) by media-motion.tv (CommuniGate Pro SMTP 6.1.0) with ESMTPS id 7231192 for AE-List@media-motion.tv; Wed, 16 Jan 2019 21:36:56 +0100 Received: by mail-qt1-f182.google.com with SMTP id d19so8829520qtq.9 for ; Wed, 16 Jan 2019 12:46:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=a1k8I114YzMZHYn0FADlL13HbOCfu6gx/Y93ci2bNtg=; b=iS9hA5uO6Qklrz7o8qs2DqCR7ECXG9U4p8HWx1pookf0JT2b/AYDSJVfxwpXyhdzVZ pHpe7YrWrTCE9NoCjv0UikSlK0/r684V04wefaXnOyND7FOSn6F2tbJPwIkXG4KoQLHt dxOG1Gmb6DrJNo9xe0HY1F4GuWq1ZXCD8b+u8ptEmqjRp4xYsyyxn4mu/y+lk9c+n7nF Z2/vSsXSi59GX3rLJ7xWxGGFkZa0j0HPbpl2uxLc0zfYze4qToNYrkQFKS2M89pITKiT FOUSWxMuEyzlema6JaKheLUBeGttnS3YTfwnZrd1gexH6lx7d1IIWfan/ot9Kr8MsGl8 X1WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=a1k8I114YzMZHYn0FADlL13HbOCfu6gx/Y93ci2bNtg=; b=ViqeECuduFh6ycmYAxi0gPOU2MJxgLFQPd/Z6Cy1P36fNft5tv4VEZE2blVAzv7VH9 GlJWsyYCjIjwFoJhnorDiZutgff+b0FVkL5aI77N6KANhIMLFVqaA6/WvLjiEktQ507+ 3XA98tKodFzK4O4xXUpT3V60O/baVzDIS/QtuHnufrfRY4J/OqTFc0mwdKEeXwT89EGp 8SWdJgVHLrnr15k+t+wzWmww1x9LYb6zpKIQnG09sH4DHQMdE723hMgpUn1tmbJeAsBb xSVp9xa9G9kuULB9Tj+ygVzElzfcDwE9tBlx5XdMxGKngJYceeGfbgXTSQOnxM1ZUKOn tvYw== X-Gm-Message-State: AJcUukcn2L93+zF4I9jOgnqijYn/9p14smeOfJhw9PJv9K7So7ExlV54 lqbu7kjJq51+8Y5B6aTQKvExi1m2MZA6MwnWkmpJ4d+x X-Google-Smtp-Source: ALg8bN7yji36bYH7nenWbXTNchBukOkXr7qKuc6nk4KiualBCPghoIyRgnEu+e62SPyDOm1COSmwf97sO91deITh5ww= X-Received: by 2002:ac8:285c:: with SMTP id 28mr8498113qtr.54.1547671581269; Wed, 16 Jan 2019 12:46:21 -0800 (PST) MIME-Version: 1.0 Date: Wed, 16 Jan 2019 15:46:09 -0500 Message-ID: Subject: sourceRectAtTime() on 3D layers To: After Effects Mail List Content-Type: multipart/alternative; boundary="000000000000d4a555057f995ece" --000000000000d4a555057f995ece Content-Type: text/plain; charset="UTF-8" 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= effect("Text layer 1")("Layer"); //layer choice comes from the drop down tM = thisLayer.marker.key(1).time; //get the time from the marker on when to sample the bounding box R=L.sourceRectAtTime(tM, true); //get the rect extraScale = effect("ExtraScale")("Slider"); //log all the corners UL = L.toComp([R.left,R.top]); UR = L.toComp([R.left+R.width,R.top]); LR = L.toComp([R.left+R.width,R.top+R.height]); LL = L.toComp([R.left,R.top+R.height]); maxX = Math.max(UL[0],UR[0],LR[0],LL[0]); minX = Math.min(UL[0],UR[0],LR[0],LL[0]); maxY = Math.max(UL[1],UR[1],LR[1],LL[1]); minY = Math.min(UL[1],UR[1],LR[1],LL[1]); tS = (maxX-minX) / (100 / L.transform.scale[0]); //width guide null layer gWidth = thisComp.layer("width guide").transform.scale[0]; x = transform.scale[0]; if (tS > gWidth){ //get the parent scale if there is one oS = tS; }else{oS = gWidth} o = gWidth / oS; x = x * o ; [x + extraScale, x + extraScale] --000000000000d4a555057f995ece Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I have a null that is being scaled by a t= ext 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 sourceRe= ct. I've put that marker after the animation is over and the text is sq= uared up. However, as the text moves I'm seeing some motion on the scal= e values. I thought the sourceRect function was supposed to only pull from = the value you supplied in the time value?


L=3D effect("T= ext layer 1")("Layer"); //layer choice comes from the drop d= own
= 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
extraS= cale =3D effect("ExtraScale")("Slider");
=C2=A0 //log all t= he 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]);
<= font face=3D"monospace, monospace" color=3D"#0000ff">minY =3D Math.min(UL[1= ],UR[1],LR[1],LL[1]);
=C2=A0=C2=A0
tS =3D (maxX-minX) / (100 / L.transform.scale[0]= );
/= /width guide null layer
gWidth =3D thisComp.layer("width guide").tran= sform.scale[0];
x =3D transform.scale[0];

if (tS > gWidth){ //get the parent scale if there is one
oS =3D tS;
}else= {oS =3D gWidth}

o =3D gWidth / oS;
x = =3D x * o ;
[x + extraScale, x + extraScale]
--000000000000d4a555057f995ece--