Return-Path: Received: from mail-ve0-f172.google.com ([209.85.128.172] verified) by media-motion.tv (CommuniGate Pro SMTP 4.2.10) with ESMTP-TLS id 5050342 for AE-List@media-motion.tv; Wed, 24 Apr 2013 22:41:49 +0200 Received: by mail-ve0-f172.google.com with SMTP id db10so981482veb.3 for ; Wed, 24 Apr 2013 13:50:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type:x-gm-message-state; bh=4eNRa0WhTZEnTIfdM1lQftkDO3erUGoeeEesu7LRcGw=; b=opXhbVxHISjMi9xv8LZRmlgbkl+9K/1fPCHcvEJ87IDhk+jLssxGBrugATP3xPB1TS eaufGmSFyFJ+wsgO3hDyYI/UJZ1MB5K2FwMOA4esmZTPholamj4Kvtm1iR2/Pmq/tRu0 PdiOmL852Y6BxFTl+3+ttZAkNgdkEPhJOAsW5IK7MHsVW98ybvg2jDB2AgTodzbitr7x dnEfIG8OIRfPD5eDAgFwegoaC3wZfpFIfSWTFBlSLLFVIq1ZDficDZhn7tTPxOVf9Iek lzME2/zhWvH9MeybVhrUW4mQHa5AxNEjuaUhvgnWrjoSBWUNN28nuFbleOyOlm7dLG/A EEiA== X-Received: by 10.52.176.38 with SMTP id cf6mr21931415vdc.132.1366836610010; Wed, 24 Apr 2013 13:50:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.58.219.197 with HTTP; Wed, 24 Apr 2013 13:49:49 -0700 (PDT) In-Reply-To: References: From: Robert Kjettrup Date: Wed, 24 Apr 2013 22:49:49 +0200 Message-ID: Subject: Re: [AE] Converting animated camera Orientation to Rotation? To: After Effects Mail List Content-Type: multipart/alternative; boundary=bcaec5015cfb9b235a04db217282 X-Gm-Message-State: ALoCoQmFi5p0CBENWfLjBLnsFNW2+ti2MrfqwuAT4bVxuZiDLLfAAgxf9Xio9YQti2R6MnMonnfh --bcaec5015cfb9b235a04db217282 Content-Type: text/plain; charset=ISO-8859-1 yes... i think that is correct. And what i want to avoid with having the rotation values instead of the orientation that is limited to 0-359.9999 degree values - Robert 2013/4/24 Phil Spitler > Sounds like Gimbal Lock to me. > > http://en.wikipedia.org/wiki/Gimbal_lock > > Phil > > > *Phil Spitler* | Creative Technologist | *Bonfire Labs* | t : > 415.394.8200 m : 415.571.3139 > > Website | Facebook| > LinkedIn > > On Apr 24, 2013, at 1:16 PM, Robert Kjettrup wrote: > > Wow... thanks Dan, exactly what i wanted. > > if it also could automaticly fix the big jumps in the graph when the value > crosses 360degrees, then you should make an deal with adobe to supply this > as a standard script with AE ;-) > > > - Robert > > > 2013/4/24 Dan Ebberts > >> Try this: >> >> { >> var myComp = app.project.activeItem; >> if ((myComp != null) && (myComp instanceof CompItem) && >> (myComp.selectedLayers.length != 0)){ >> app.beginUndoGroup("Convert 3D Orientation to Rotation"); >> var myLayer; >> var myVal; >> var t; >> for (var i = 0; i < myComp.selectedLayers.length; i++){ >> myLayer = app.project.activeItem.selectedLayers[i]; >> myOrientation = myLayer.property("Orientation"); >> if (myOrientation.numKeys > 0){ >> for (var j = 1; j <= >> myLayer.property("Orientation").numKeys; j++){ >> myVal = myLayer.property("Orientation").keyValue(j); >> t = myLayer.property("Orientation").keyTime(j); >> >> myLayer.property("xRotation").setValueAtTime(t,myVal[0]); >> >> myLayer.property("yRotation").setValueAtTime(t,myVal[1]); >> >> myLayer.property("zRotation").setValueAtTime(t,myVal[2]); >> >> myLayer.property("orientation").setValueAtKey(j,[0,0,0]); >> } >> }else{ >> myVal = myLayer.property("Orientation").value; >> myLayer.property("xRotation").setValue(myVal[0]); >> myLayer.property("yRotation").setValue(myVal[1]); >> myLayer.property("zRotation").setValue(myVal[2]); >> myLayer.property("orientation").setValue([0,0,0]); >> } >> } >> app.endUndoGroup(); >> }else{ >> alert("Please select at least one layer..."); >> } >> } >> >> >> Dan >> >> *From:* Robert Kjettrup >> *Sent:* Wednesday, April 24, 2013 12:16 PM >> *To:* After Effects Mail List >> *Subject:* Re: [AE] Converting animated camera Orientation to Rotation? >> >> No... i just want to manually adjust some of the keyframes of the >> rotation, eg. smoothing some areas, but that is really hard to do with the >> orientation keyframes when it jumps from 359.9 degrees to 0, making huuuge >> visual jumps in the graph editor. >> >> - Robert >> >> >> 2013/4/24 scott.aelist >> >>> > Doing any adjustments on a keyframed orientation is really >>> counterintuitive. >>> >>> Sounds like you want to use an expression rather than a script then? >>> >>> +---End of message---+ >>> To unsubscribe send any message to >>> >> >> > > > --bcaec5015cfb9b235a04db217282 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
yes... i think that is correct. And what i want to avoid w= ith having the rotation values instead of the orientation that is limited t= o 0-359.9999 degree values

- Robert


2013/4/24 Phil Spitler <p= hil@bonfirelabs.com>
Sounds like Gimbal Lock to me.

=

Phil


Phil Spitler= =A0 |=A0 Creative Technologist =A0 |=A0 Bonfire Labs=A0 |=A0 t : 415.394.8200=A0 m : 415.571.3139

Website | Facebook | <= a href=3D"http://www.linkedin.com/company/235257?trk=3Dtyah" target=3D"_bla= nk">LinkedIn

On Apr 24, 2013, at 1:16 PM, Robert Kjettrup wrote:

=
Wow... thanks Dan, exactly what = i wanted.=A0

if it also could automaticly fix the big jumps in the graph when the value= crosses 360degrees, then you should make an deal with adobe to supply this= as a standard script with AE ;-)


<= div class=3D"gmail_extra">
- Robert


2013/4/24 Dan Ebberts = <debberts@comc= ast.net>
Try this:
=A0
{
=A0=A0=A0 var myComp =3D app.project.activeItem;
=A0=A0=A0 if ((myComp !=3D null) && (myComp instanceof=20 CompItem) && (myComp.selectedLayers.length !=3D 0)){
=A0=A0=A0=A0=A0=A0=A0 app.beginUndoGroup("Convert 3D=20 Orientation to Rotation");
=A0=A0=A0=A0=A0=A0=A0 var myLayer;
=A0=A0=A0=A0=A0=A0=A0 var myVal;
=A0=A0=A0=A0=A0=A0=A0 var t;
=A0=A0=A0=A0=A0=A0=A0 for (var i =3D 0; i <=20 myComp.selectedLayers.length; i++){
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 myLayer=20 =3D app.project.activeItem.selectedLayers[i];
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20 myOrientation =3D myLayer.property("Orientation");
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 if=20 (myOrientation.numKeys > 0){
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20 for (var j =3D 1; j <=3D myLayer.property("Orientation").numKe= ys; j++){
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20 myVal =3D myLayer.property("Orientation").keyValue(j);
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20 t =3D myLayer.property("Orientation").keyTime(j);
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20 myLayer.property("xRotation").setValueAtTime(t,myVal[0]);
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20 myLayer.property("yRotation").setValueAtTime(t,myVal[1]);
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20 myLayer.property("zRotation").setValueAtTime(t,myVal[2]);
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20 myLayer.property("orientation").setValueAtKey(j,[0,0,0]);
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20 }
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20 }else{
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20 myVal =3D myLayer.property("Orientation").value;
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20 myLayer.property("xRotation").setValue(myVal[0]);
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20 myLayer.property("yRotation").setValue(myVal[1]);
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20 myLayer.property("zRotation").setValue(myVal[2]);
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=20 myLayer.property("orientation").setValue([0,0,0]);
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 }
=A0=A0=A0=A0=A0=A0=A0 }
=A0=A0=A0=A0=A0=A0=A0 app.endUndoGroup();
=A0=A0=A0 }else{
=A0=A0=A0=A0=A0=A0=A0 alert("Please select at least=20 one layer...");
=A0=A0=A0 }
}
=A0
=A0
Dan
=A0
Sent: Wednesday, April 24, 2013 12:16 PM
Subject: Re: [AE] Converting animated camera Orientation to=20 Rotation?
=A0
No... i just want to manually adjust some of the keyframes= of the=20 rotation, eg. smoothing some areas, but that is really hard to do with the= =20 orientation keyframes when it jumps from 359.9 degrees to 0, making huuuge= =20 visual jumps in the graph editor.
=A0
- Robert
=A0
=A0
2013/4/24 scott.aelist <scott.aelist@gmail= .com>
> Doing any adjustments on a keyframed orientation is really=20 counterintuitive.

Sounds like you want to use an expression= =20 rather than a script then?

+---End of message---+
To unsubscrib= e=20 send any message to <ae-list-off@media-motion.tv>
=A0



--bcaec5015cfb9b235a04db217282--