Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

CEP Drag & Drop API in After Effects

New Here ,
Jul 23, 2019 Jul 23, 2019

I have a CEP plugin panel for Adobe Premiere which allows the user to search for assets in a remote system and add them to the project using drag & drop.  Specifically it is populating the "com.adobe.cep.dnd.file" property in the dataTransfer event property on the dragStart event.  I have been adapting the plugin to work with After Effects but this particular feature is not working.  I have checked the documentation and code samples for CEP 8 and CEP 9 and nothing seems to address whether the API doesn't work and/or uses a different property for messaging.  Is anyone aware if there is an API / event model for drag & drop from a CEP panel in After Effects?  Thanks!

1.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 23, 2019 Jul 23, 2019

The user is just dragging files from Explorer/Finder onto your panel yea? I use this functionality with the standard Javascript dataTransfer.files and it works in AE and Premiere. Have you tried that?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 25, 2019 Jul 25, 2019

Actually it's the opposite -- the panel loads information about assets from an external asset management system; the user drags one of the HTML elements into the project.  On the dragStart event, the CEP drag & drop event property ("com.adobe.cep.dnd.file.#" where # is the index of the file in the list) is populated with the path of the actual file, or a placeholder file depending on the user's configuration.  In the latter scenario the actual file is then downloaded and replaces the placeholder content once ready.

This works fine in Premiere but I can't seem to get it to work in AE -- I haven't found anything in documentation and/or forum posts to indicate if the expected behavior is different or the feature simply isn't supported in AE.  Security constraints in JS / Chromium framework prevent just setting file objects in the files property of the event data object.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 25, 2019 Jul 25, 2019
LATEST

Oh, interesting, I haven't actually used that functionality before. Can you post a snippet I can test?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines