5 Replies Latest reply on May 26, 2017 12:44 PM by Bruce Bullis

    How does ProjectItem.findItemsMatchingMediaPath() work?

    sberic Level 2

      Bruce Bullis: API question for you!

       

      I'm trying to use the ProjectItem.findItemsMatchingMediaPath() function to locate a previously imported ProjectItem. Contrary to my previous assumptions, the Media Path is actually related to the path of a clip on the file system. Specifically, it is not related to the item's treePath in any way.

       

      In some "throw spaghetti at the wall and see what sticks" testing, I've found that specifying either:

       

      1. the exact file system path of the asset in question, or
      2. the file name of the asset in question

       

      the function will return usable results. This leads me to a few questions, related to how this API actually works internally:

       

      1. Is it overloaded to take either a filePath or a fileName?
      2. Or does it simply parse out the fileName from a submitted path?
      3. Does it resolve directories at all? (e.g. will it return a list of any ProjectItems with assets in the specified directory location?)

       

      Input would be greatly appreciated.