var myComp = app.project.activeItem;
if ((myComp != null) && (myComp instanceof CompItem) && (myComp.selectedLayers.length != 0)){
app.beginUndoGroup("Convert 3D Orientation to Rotation");
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]);
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]);
alert("Please select at least one layer...");
Sent: Wednesday, April 24, 2013 12:16 PM
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.
2013/4/24 scott.aelist <scott.aelist@gmail.com>
> 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 <ae-list-off@media-motion.tv>