1 Reply Latest reply: Sep 19, 2012 2:12 PM by shachar carmi RSS

    asset management for Plug-ins

    david van brink Community Member

      After Effects performs certain kinds of asset management for a project. When you import an image or footage, the project keeps a file-reference to it, sometimes relative. You can "Collect Files..." and gather them all to one place. Handy!

       

      Is there any way for a plug-in to get in on that action?

       

      For my effect plugin "omino_python", which runs a python script to draw on a layer, I refer to external scripts.

       

      It seems the best way to do this, for now, is use a custom parameter, or maybe options dialog, to select a file, and save the file path as parameter (or options) data.

       

      Is there a way to find the project's path? Then the file path could at least be relative. It seems best to NOT save the whole script as parameter data; I want the user to own their own files for revision control and what not.

       

      What I'd love is a PF_Param_FILE_ASSET type, and let AE manage it. Be part of the "Collect Files..." club. Is there anything sort-of close?

        • 1. Re: asset management for Plug-ins
          shachar carmi Community Member

          for starters, lookup PF_Cmd_GET_EXTERNAL_DEPENDENCIES along with PF_OutFlag_I_HAVE_EXTERNAL_DEPENDENCIES.

          i don't know if that flag will cause AE to gather the said files when doing a "collect", bet hey, that's the closest thing i know of to what you're looking for.

           

          if that doesn't help, i would have stored both the path and the script in a custom param (or sequence data).

          then if the file pointed to by the path exists, then you can discard the internally kept copy of the script. if it doesn't exist you can ask the user where to save it, and create a file the user can edit externally.