Return-Path: Received: from mail-vc0-f180.google.com ([209.85.220.180] verified) by media-motion.tv (CommuniGate Pro SMTP 4.2.10) with ESMTP-TLS id 5325904 for AE-List@media-motion.tv; Sat, 21 Dec 2013 19:16:19 +0100 Received: by mail-vc0-f180.google.com with SMTP id ia6so1879687vcb.39 for ; Sat, 21 Dec 2013 10:19:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=U28dejRqwA5bMAii1vn8JX1llnZVtuXyrLMBy0gH2ho=; b=Px9UAhwiApGWoobusxUKc3LDX1leLtoaMSF3BTuw2Ax3Z2lU8irSJZaXWiRQSZBtaR kaONREDywe8BKtWlxzK+lfp2TXmEDY97Y7KUM4NsBMHkjzeIHSWMd3pHN5JjKB6QSlwP 6JgF94+iT4NR0I78dyvFahAX7HHj3+oLq2BN5h9Gm3gm0xRam+5f0kefkZ5SXEL70/yj 6rDLfznNJlt0GeIHMra0LxWERtJdyMVY+si2+FjeCgjc09pjWm9ZMa0XlMKmqX0gRvpG EeSc0kfFmEyEGbnrvUnUpnJPBPtoibON2VII8SOHkwydb+Bty1bo5cuhaM+HpvsoZC4c 7Njg== X-Gm-Message-State: ALoCoQmoYlk51yE/5zu8z5NayHMWi13TtaX3YiwpRHxRwqRFqq/XHipQR9rcojiTgeqzk8q5u8UU X-Received: by 10.221.47.193 with SMTP id ut1mr8436595vcb.8.1387649960725; Sat, 21 Dec 2013 10:19:20 -0800 (PST) MIME-Version: 1.0 Received: by 10.58.45.66 with HTTP; Sat, 21 Dec 2013 10:19:00 -0800 (PST) In-Reply-To: References: From: Robert Kjettrup Date: Sat, 21 Dec 2013 19:19:00 +0100 Message-ID: Subject: Re: [AE] Expressions: Somewhere between Auto Orient and Auto Orient Y only To: After Effects Mail List Content-Type: multipart/alternative; boundary=001a113392ecfb656104ee0f6e1c --001a113392ecfb656104ee0f6e1c Content-Type: text/plain; charset=ISO-8859-1 Hi Roland Yes, you are ofcourse correct in your observation about it not handling a non-camera situation. But i cant get your try/catch expression to work in this case either, and i cant seem to find where the error is in the expression.... hmmmm.... maybe i should just get back to the christmas stuff instead of spending time on this that not even is a problem i have right now for any project, and sorry to Byron for hijacking his thread. Hope some of my input has been useful and on topic :-D Robert 2013/12/21 Roland Kahlenberg (RoRK) > Robert, your Expression, with activeCamera will result in an Expression > error popup if there is no activeCamera where the Timeline Indicator is > located. The Expression error may also occur when an activeCamera is > present - it's a strange error. Thanks to Dan Wilk from plabt, I'm now able > to use the try/catch routine to overcome Expression errors such as this. > > Here's the script you amended from DanE's, with the try/catch statements - > > //start script > cam = false; > try {cam = thisComp.activeCamera; } > catch (err) {}; > if (cam == 1) { > v = cam.toWorldVec([0,0,1]); > lookAt(position,position+v) > } else { > value > // set value to what you want should the Expression result in an error ie > activeCamera is false > } > //end script > > HTH > - Roland Kahlenberg > * LATEST AE Workshop * > http://www.broadcastGEMs.com/MediaScreamer01/bGEMs_MoGraphIntensity_Promo_MG01_18Nov_2013_VBR4_01.mp4 > > Intensive mocha & AE Training in Singapore and Other Dangerous Locations > Imagineer Systems (mocha) Certified Instructor & Adobe After Effects > ACE/ACI CS6 > http://www.broadcastGEMs.com/training > > ----- Original Message ----- > From: "Robert Kjettrup" > To: "After Effects Mail List" > Sent: Saturday, December 21, 2013 11:14:59 PM > Subject: Re: [AE] Expressions: Somewhere between Auto Orient and Auto > Orient Y only > > > i had the same exact problem a few weeks ago, and i hacked together an > expression to do it. It actually does the same as Dan E's version, but > ofcourse Dan's is much more elegant, simpler and works with the camera as a > child under a null, something i struggled to get to work in my version :-D > > > thanks Dan for this, i will save that as an animation preset... with one > small adjustment, adding support for the active camera: > > cam = thisComp.activeCamera; > v = cam.toWorldVec([0,0,1]); > lookAt(position,position+v) > > and for anyone interested, here is my simple much worse version that > breaks if the camera is parented: > > cam = thisComp.activeCamera; > fromPoint = cam.position; > atPoint = cam.pointOfInterest; > lookAt(fromPoint, atPoint) > > DONT USE this :-D > > and my expression for making it work under nulls was more complicated and > needed 2 extra nulls for the expression to look to. I couldnt get > .toWorldVec to work with the cameras position and target, only with nulls. > > Happy Holidays to all on the AE-list. > Robert > > > > > +---End of message---+ > To unsubscribe send any message to > --001a113392ecfb656104ee0f6e1c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi Roland

Yes, you are ofcourse correct= in your observation about it not handling a non-camera situation.

But i cant get your try/catch expression to work in this c= ase either, and i cant seem to find where the error is in the expression...= . hmmmm....

maybe i should just get back to the christmas stuff ins= tead of spending time on this that not even is a problem i have right now f= or any project, and sorry to Byron for hijacking his thread. Hope some of m= y input has been useful and on topic :-D

Robert=A0



201= 3/12/21 Roland Kahlenberg (RoRK) <aemaillist@broadcastgems.com<= /a>>
Robert, your Expression, with activeCamera w= ill result in an Expression error popup if there is no activeCamera where t= he Timeline Indicator is located. The Expression error may also occur when = an activeCamera is present - it's a strange error. Thanks to Dan Wilk f= rom plabt, I'm now able to use the try/catch routine to overcome Expres= sion errors such as this.

Here's the script you amended from DanE's, with the try/catch state= ments -

//start script
cam =3D false;
try {cam =3D thisComp.activeCamera; }
catch (err) {};
if (cam =3D=3D 1) {
v =3D cam.toWorldVec([0,0,1]);
lookAt(position,position+v)
} else {
value
// set value to what you want should the Expression result in an error ie a= ctiveCamera is false
}
//end script

HTH
- Roland Kahlenberg
* LATEST AE Workshop *
http://www.broadcastGEMs.com/MediaScreamer01/bGEMs_MoGraphIntensity_Pr= omo_MG01_18Nov_2013_VBR4_01.mp4

Intensive mocha & AE Training in Singapore and Other Dangerous Location= s
Imagineer Systems (mocha) Certified Instructor & Adobe After Effects AC= E/ACI CS6
http://= www.broadcastGEMs.com/training

----- Original Message -----
From: "Robert Kjettrup" <robert@stvmayday.dk>
To: "After Effects Mail List" <AE-List@media-motion.tv>
Sent: Saturday, December 21, 2013 11:14:59 PM
Subject: Re: [AE] Expressions: Somewhere between Auto Orient and Auto Orien= t Y only


i had the same exact problem a few weeks ago, and i= hacked together an expression to do it. It actually does the same as Dan E= 's version, but ofcourse Dan's is much more elegant, simpler and wo= rks with the camera as a child under a null, something i struggled to get t= o work in my version :-D


thanks Dan for this, i will save that as an animation preset... with one sm= all adjustment, adding support for the active camera:

cam =3D thisComp.activeCamera;
v =3D cam.toWorldVec([0,0,1]);
lookAt(position,position+v)

and for anyone interested, here is my simple much worse version that breaks= if the camera is parented:

cam =3D thisComp.activeCamera;
fromPoint =3D cam.position;
atPoint =3D cam.pointOfInterest;
lookAt(fromPoint, atPoint)

DONT USE this :-D

and my expression for making it work under nulls was more complicated and n= eeded 2 extra nulls for the expression to look to. I couldnt get .toWorldVe= c to work with the cameras position and target, only with nulls.

Happy Holidays to all on the AE-list.
Robert




+---End of message---+
To unsubscribe send any message to <ae-list-off@media-motion.tv>

--001a113392ecfb656104ee0f6e1c--