Finding file type in comp

Hi,
I’m trying to label layers in a comp automatically based partly on the type of layer they are. (For instance, audio, video, Illustrator file, Photoshop file, etc). Is there a way to find the file type through the comp itself? Or do you have to go back to the project window to find that information out?

Thanks!
Sean

Hi @skimber, there are 2 crucial properties that is currently missing and will be added in the next update,
“has video” and “has audio”, these property can help label the layers more precisely and easily.

I want to give you a different solution that will work in the current version too,
you can check the file extension of the footage against a group of file extension texts that represent the group you are labeling, for example - video footage, I searched and copied this list of extensions from the after effects import panel that I think should be labeled as a video layer.

“.r3d,.swf,.mxf,.mov,.3gp,.3g2,.mp4,.m4v,.m4a,.qt,.crm,.mpeg,.mpe,.mpv,.m2p,.mpa,.mp2,.mpg,.m2v,.m2a,.m2t,.ts,.ac3,.vob,.flv,.avi,.mkv,.ari”

Now I want to check automatically if an item “file extension” property equal to one of the texts in this list instead of searching one by one using 33 “if” lines just for this label.

it can be done using the “contains text element” text variable property, this property will check if a text contains another text within it (read more in the tooltip).
the text variable have a property called “text element”, you have to set the “text element” to the extension of the file.

in the example I labeled 4 groups - audio, video, Illustrator file, Photoshop file.
Download here -
label layers.json (44.4 KB)

Please let me know if you have more questions.
Thanks,
Alon

This is amazing. Thank you so much! And looking forward to that update! :slight_smile:

1 Like