Return-Path: Received: from mail-wg0-f48.google.com ([74.125.82.48] verified) by media-motion.tv (CommuniGate Pro SMTP 4.2.10) with ESMTP-TLS id 5286140 for AE-List@media-motion.tv; Fri, 15 Nov 2013 00:40:09 +0100 Received: by mail-wg0-f48.google.com with SMTP id n12so2836952wgh.15 for ; Thu, 14 Nov 2013 15:42:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to:content-type; bh=782HFebBaUyedYJZoht9qKhxfpPKPEpdcAJAQgpVQoI=; b=eciKs+nemiFTuOOjQ3HpduSOF2nfGL+BhF01CYhjnIxsCXmwWnwv5sKjev0gvuANZ1 RS38mbvsSXZqwjWe+gxU5jfK8UL3Syzh31gK6uKPYm1f+az4K+74phMQCwk6L5TXBdBq Oq6yDhdmP2JLuqgdmQs2kQDcUjP5LfZ2Npnpnuyl7nN5ApAAHt7zoHdWj4Y6JOhgVsq3 XpF/ObszqzxpHRPVsDytbOYjuwRbAgraQ9k6eX1awym0Z+3WrTmvBbO9PMLhTlGxgqYv YOgEPbyt7p1fBZrVzTbh1oEKCy8acuURRejqOpCB/B48js/vqjCDaGpFPb9mJ501VW+Q gC3w== X-Received: by 10.180.37.227 with SMTP id b3mr5234861wik.24.1384472520187; Thu, 14 Nov 2013 15:42:00 -0800 (PST) MIME-Version: 1.0 Sender: hedczech@gmail.com Received: by 10.217.106.136 with HTTP; Thu, 14 Nov 2013 15:41:20 -0800 (PST) From: "scott.aelist" Date: Thu, 14 Nov 2013 15:41:20 -0800 X-Google-Sender-Auth: GeOIgYa9CDpI8eB8Pv0EK4LE30M Message-ID: Subject: expressions: parent/move layer based on proximity? To: After Effects Mail List Content-Type: multipart/alternative; boundary=e89a8f646ff9c46cac04eb2ba057 --e89a8f646ff9c46cac04eb2ba057 Content-Type: text/plain; charset=ISO-8859-1 I'm trying to merge two expressions i've found, one that 'parents' a layer's position to a master layer, and another that modulates a value based on proximity. My goal is to have a master layer 'smear' the position of child layers depending on how close they are. Sort of like the way this AI tool works. I believe the problem is in the syntax of the last three lines where I try to combine the proximity value to the parenting. I get: ERROR: Class property has no method named value Any ideas what I'm doing wrong? // get proximity // // Point1 is current layer, point2 is control layer point1=this_layer.position; point2=this_comp.layer("drag me").position; // Find the vector between the 2 points delta=sub(point1, point2); // Now find the length distance=length(delta); //Use linear() to remap distance to range of 40 to 0 n = linear(distance, 0, 40,20, 0); // parenting // myParent = thisComp.layer("drag me"); myProp = myParent.transform.position; // combine proximity and parenting // x = transform.position[0] + (myProp[0].value - myProp[0].valueAtTime(0) * n); y = transform.position[1] + (myProp[1].value - myProp[1].valueAtTime(0) * n); [x,y] --e89a8f646ff9c46cac04eb2ba057 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I'm trying to merge two expressions i&#= 39;ve found, one that 'parents' a layer's position to a master = layer, and another that modulates a value based on proximity. My goal is to= have a master layer 'smear' the position of child layers depending= on how close they are. Sort of like the way this AI = tool works.
I believe the problem is in the syntax of the last three lines where = I try to combine the proximity value to the parenting.
I get: ERRO= R: Class property has no method named value
Any ideas what I'm= doing wrong?

// get proximity //
// Point1 is current l= ayer, point2 is control layer
point1=3Dthis_layer.position;
point2=3D= this_comp.layer("drag me").position;
// Find the vector betwee= n the 2 points
delta=3Dsub(point1, point2);
// Now find the length
distance=3Dlength= (delta);
//Use linear() to remap distance to range of 40 to 0
n =3D l= inear(distance, 0, 40,20, 0);

// parenting //
myParent =3D thisCo= mp.layer("drag me");
myProp =3D myParent.transform.position;

// combine proxim= ity and parenting //
x =3D transform.position[0] + (myProp[0]= .value - myProp[0].valueAtTime(0) * n);
y =3D transform.position[1] + (m= yProp[1].value - myProp[1].valueAtTime(0) * n);
[x,y]



--e89a8f646ff9c46cac04eb2ba057--