Page 1 of 1
Footage layer source file name
Posted: October 4th, 2007, 1:24 pm
by tlawrimore
Hey,
With a selected layer, it's easy enough to check the source and get the first frame name in a file sequence, but can I get the frame name of any given frame in a composition?
For instance: I have a sequence "beauty[0140-0300].tga" in a comp. The inpoint for the layer is 108, So at frame 108 the current file is beauty0140.tga, but what about any other frame? After Effects will give me only the name of the first frame in sequence. (or am I wrong?)
I'm trying to escape the fact that a sequence can be formatted in so many ways. (ie. file.1.tga or file0001.tga or file_00001.tga etc.), so I want AFX to give me a proper name at each frame.
Thanks,
Todd
Posted: October 11th, 2007, 11:15 am
by lloydalvarez
have not looked into how it would be possible to do this with a script, but what I have always done over the years is I went to the frame I wanted in the comp and did Edit Original (Cmd-E) which launches that particular frame in photoshop (or whatever program created the image and I can get the file) and got the filename that way..
-Lloyd
Posted: October 11th, 2007, 2:41 pm
by Paul Tuersley
lloydalvarez wrote:have not looked into how it would be possible to do this with a script, but what I have always done over the years is I went to the frame I wanted in the comp and did Edit Original (Cmd-E) which launches that particular frame in photoshop (or whatever program created the image and I can get the file) and got the filename that way..
I can't think of an easy way to do it with a script either. But following on from what Lloyd said, going to the frame in the comp and pressing Cmd-Alt-E shows the name of that frame in the Info panel.
Paul
Posted: October 11th, 2007, 3:29 pm
by lloydalvarez
aha! in that case, could this be solved with app.executeCommand?
There doesnt seem to be a Menu Command Attached to that shortcut so app.findMenuCommandId wouldn't work would it?
-Lloyd
Posted: October 11th, 2007, 3:57 pm
by Paul Tuersley
I haven't played with app.executeCommand much, but I think you're right that it wouldn't work.
To do this as a script, my first thought is it'd be something like:
1. Use the file path to get the folder object that contains the footage.
2. Do a folder.getFiles() to get an array of files (file objects) in the folder.
3. Loop through this array until you find a match to the first file.name.
4. Continue looping through by the offset required to find the name of the file on the specific frame.
Paul
Footage layer source file name
Posted: October 15th, 2007, 2:06 pm
by tlawrimore
Hey guys,
Cmd-Alt-E is very interesting. I didn't know about that, Thank you.
Hmmm, Is it possible to hook that info from a script? That's a good question for Adobe.
Certainly looping through the folder object with some intelligent regexp might provide me all I need to know.
Thanks again. I promise to post my results, because I'm not going to let go of this idea.
-Todd
Re: Footage layer source file name
Posted: June 26th, 2008, 2:51 pm
by byronnash
So there is no way to return the filename using mainSource or source attributes of a project item? I've been trying and coming up dry.
Re: Footage layer source file name
Posted: June 27th, 2008, 9:35 am
by tlawrimore
Hey,
Not in CS2. (that I could find). Maybe CS3 has something I could use. I finally just made a pop up box that forces the user to select the formating of the numbered sequence. That's all I really wanted it for anyway. My script is finished though due to a lack of error checking and a couple of little bugs, I'd never let anyone see it. I'd be too embarrassed. I've sort of abandoned it though I know I'll come back to it again.
Byron, I catch up with you off line.
-Todd