Copy link to clipboard
Copied
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!
Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Oh, interesting, I haven't actually used that functionality before. Can you post a snippet I can test?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now