Skip to main content
Participant
July 23, 2019
Question

CEP Drag & Drop API in After Effects

  • July 23, 2019
  • 1 reply
  • 1521 views

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!

This topic has been closed for replies.

1 reply

Justin Taylor-Hyper Brew
Community Expert
Community Expert
July 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?

kkronyakAuthor
Participant
July 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.

Justin Taylor-Hyper Brew
Community Expert
Community Expert
July 25, 2019

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