Return-Path: Received: from omta2.brinkster.com ([65.182.109.101] verified) by media-motion.tv (CommuniGate Pro SMTP 4.2.10) with ESMTP id 5325935 for AE-List@media-motion.tv; Sat, 21 Dec 2013 20:02:07 +0100 Received: from localhost (localhost.localdomain [127.0.0.1]) by omta2.brinkster.com (Postfix) with ESMTP id 0FC8A105057 for ; Sat, 21 Dec 2013 12:05:10 -0700 (MST) X-Virus-Scanned: amavisd-new at omta2.brinkster.com Received: from omta2.brinkster.com ([127.0.0.1]) by localhost (omta2.brinkster.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9i5keDAcMLYD for ; Sat, 21 Dec 2013 12:04:57 -0700 (MST) Received: from mta5.brinkster.com (unknown [65.182.109.84]) by omta2.brinkster.com (Postfix) with ESMTPS id 5068310406B for ; Sat, 21 Dec 2013 12:04:57 -0700 (MST) Received: from localhost (localhost.localdomain [127.0.0.1]) by mta5.brinkster.com (Postfix) with ESMTP id 430A23200A7 for ; Sat, 21 Dec 2013 12:04:57 -0700 (MST) X-Virus-Scanned: amavisd-new at mta5.brinkster.com Received: from mta5.brinkster.com ([127.0.0.1]) by localhost (mta5.brinkster.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MQat9LgPPH2W for ; Sat, 21 Dec 2013 12:04:53 -0700 (MST) Received: from mail5c.brinkster.com (mail5c.brinkster.com [10.0.6.192]) by mta5.brinkster.com (Postfix) with ESMTP id 935393200BB for ; Sat, 21 Dec 2013 12:04:53 -0700 (MST) Date: Sat, 21 Dec 2013 12:05:06 -0700 (MST) From: "Roland Kahlenberg (RoRK)" To: After Effects Mail List Message-ID: <1793261079.925095.1387652706161.JavaMail.root@broadcastgems.com> In-Reply-To: Subject: Re: [AE] Expressions: Somewhere between Auto Orient and Auto Orient Y only MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [220.255.1.151] X-Mailer: Zimbra 7.2.2_GA_2852 (ZimbraWebClient - GC31 (Win)/7.2.2_GA_2852) AccCKK!!! Sorry about the earlier hiccup. I think this should work - //start script cam = false; try {cam = thisComp.activeCamera; } catch (err) {}; if (cam) { 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: Sunday, December 22, 2013 2:19:00 AM Subject: Re: [AE] Expressions: Somewhere between Auto Orient and Auto Orient Y only 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) < aemaillist@broadcastgems.com > 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" < 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 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 < ae-list-off@media-motion.tv >