Footage layer source file name

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
tlawrimore
Posts: 5
Joined: September 7th, 2007, 5:58 am
Location: Atlanta

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
User avatar
lloydalvarez
Enhancement master
Posts: 460
Joined: June 17th, 2004, 9:27 am
Location: New York City, NY
Contact:

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
Paul Tuersley
Posts: 704
Joined: June 5th, 2004, 7:59 am
Location: London, UK

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
User avatar
lloydalvarez
Enhancement master
Posts: 460
Joined: June 17th, 2004, 9:27 am
Location: New York City, NY
Contact:

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
Paul Tuersley
Posts: 704
Joined: June 5th, 2004, 7:59 am
Location: London, UK

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
tlawrimore
Posts: 5
Joined: September 7th, 2007, 5:58 am
Location: Atlanta

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
byronnash
Posts: 321
Joined: July 7th, 2004, 2:30 pm
Location: Charlotte, NC
Contact:

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.
tlawrimore
Posts: 5
Joined: September 7th, 2007, 5:58 am
Location: Atlanta

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
Post Reply