Moderator: Paul Tuersley
var data = new Object();
data.xpos = "";
data.ypos = "";
data.zpos = "";
data.xrot = "";
data.yrot = "";
data.zrot = "";
data.flen = "";
function getData(comp, layer, data)
for (var t = 0; t < comp.duration; t += comp.frameDuration)
data.xpos += layer.position.valueAtTime(t, false) + " ";
data.ypos += layer.position.valueAtTime(t, false) + " ";
data.zpos += layer.position.valueAtTime(t, false) + " ";
data.xrot += layer.rotationX.valueAtTime(t, false) + " ";
data.yrot += layer.rotationY.valueAtTime(t, false) + " ";
data.zrot += layer.rotationZ.valueAtTime(t, false) + " ";
data.flen += getFocalLengthFromZoom(layer.zoom.valueAtTime(t, false)) + " ";
/* Check that everything is ok
var file = new File("test.txt");
var comp = app.project.activeItem;
var layer = comp.layer(1);
var data = new DataContainer();
getData(comp, layer, data);
urbanspaceman wrote:I took a shot at adding a progress bar to the script, and I've been struggling with the progressbar attribute for days now. I'm certain this is a bug, because it does not work properly in AE8. Has anyone reading this got it to work?
Part of my goal was to write something that would work for AE 6.5 and up...and I did create a progress bar successfully using the "edittext" box in 6.5. But in AE8 it simply looks like the window freezes, because it appears you cannot update a palette or window in the middle of a script.
I must say I've had nothing but problems with AE8 and I tend to return to AE6 or 6.5 to get my work done. I'm surprised I haven't come across more rants on the web about how full of bugs and how slow AE8 is on a Mac.
urbanspaceman wrote:I believe it is fixed now, Russ. Try downloading the file again, and tell me how it goes...
urbanspaceman wrote:Try the same link at the top, Russ. I've added the note v1.1 to the first line. I thought I knew what caused the error in the last post, but it just dawned on me what really it was. So please try it once again and let me know if it works. It works on my end so far, using both AE 6.5, AE 8, and Maya 7.
urbanspaceman wrote:I'm curious how others will make use of this, and what their workflows are. It seemed I was one of the few people out there who preferred to start a project in the rough in AE, working out my camera moves before moving on to a 3D package. There's been many times in the past where I would give an animatic to a 3D animator and ask him or her to reproduce what I'd done...but was always frustrated by the extra time it took and was extra disappointed if a 3D specialist didn't have the skills to do a smooth camera move. That's what motivated me to work on these scripts...I was tired of some 3D people telling me they couldn't recreate a camera move that I'd already finished in After Effects!!
So I'm wondering how may other artists like to work "backwards". : )
urbanspaceman wrote:I was able to reproduce the bug on my end, and I noticed why it only happened once and a while. I was referring to layers by name, but if you have the "Source Name" button clicked instead of the "Layer Name" it couldn't find the layer that had the position keyframes in it (the first part of the script puts the camera data into other layers, and then erases those layers)...I changed it so the the layers are referred to by number instead of name, and so that issue should go away.
ymmij wrote:Are you saying that you have made a change to version 1.1?
ymmij wrote:There are other "AE to 3D" solutions around, but you have to first set things up in a particular way.
ymmij wrote:The next advance to the script would be to allow any 3D layers in AE to become a fixed tracking points.
ymmij wrote:...and to be honest the 3D guys can never understand why you would want use AE at all when it comes to 3D.