Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions See if selected item is an image sequence

  • See if selected item is an image sequence

    Posted by Jacob Danell on May 29, 2014 at 10:17 pm

    Hi! I’m wondering if there is any simple way to see if a selected footageItem is an image sequence or not.
    I have looked around and tried different things but nothing worked so far. =/

    Thanks!

    Jacob Danell replied 11 years, 11 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    May 29, 2014 at 11:03 pm

    I can’t think of a simple way. I can think of a somewhat convoluted way that might work, depending on your circumstances.

    You could look at the file extension to determine if it’s a file type that would either be a still or a sequence (.jpg, .psd, .tif, etc.). Then you could check footage.mainSource.isStill for false, which should indicate a sequence (I’m guessing).

    Or maybe you could just look for the “[001-xxx]” in the file name.

    Let us know if you find something better.

    Dan

  • Jacob Danell

    May 30, 2014 at 9:07 pm

    I found a piece of code that imported the mainSource-file and checked if it’s a movie or a still image. Worked perfect for me!

    var importFile = File(app.project.selection[0].mainSource.file);
    var importOptions = new ImportOptions(importFile);
    var theImport = app.project.importFile(importOptions);
    if (theImport.mainSource.isStill) alert("it's a still");
    else alert("it's a movie");
    theImport.remove();

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy