Copy link to clipboard
Copied
I am developing a POC for a HTML panel that controls After Effects from within Premiere Pro. It is made for editors and people who are somewhat familiar with PPro but not with AE.
I wrote some code that imports an AE comp into PPro, that must have the possibility to be altered after importing. I know this works with comps that are manually imported with "dynamic link".
I am able to control the AE items from within PPro using BridgeTalk, so making these changes is not the problem.
I found this function "app.project.importAEComps(pathOfContainingProject, arrayOfCompNames)" that imports an AE comp, (from PPro2018 onward) but this imported item is not dynamically linked to AE. I need to do a manual operation, such as "edit original". I'd love to do this from within the automation.
Without dynamic link, the changes made in AE are not visible in PPro, not even after saving the AE project and re-importing the comp. There seems to be some caching involved. I need to restart PPro entirely for the changes to become visible..
importAEcomp = function(pathName, compName)
{ //This function runs in the PPro jsx environment
var prj = app.project;
prj.importAEComps(pathName, [compName]);
var impItem = undefined;
for(var t=0;t<prj.rootItem.children.numItems;t++) {
var projItem = prj.rootItem.children
; if(projItem) {
var index = projItem.name.indexOf('/'); //Use the comp name part
if(index>0) { //Search the item with our comp name
if(projItem.name.substr(0,index)===compName) {
impItem = projItem; //Found!
break;
}
}
}
}
if(impItem) {
// impItem.refreshMedia(); //Does this activate the dynamic link? Nope!
var seq = app.project.activeSequence;
var vItems = seq.videoTracks.numTracks;
if(vItems>1) { //We need at least 2 video tracks. Add our comp to the topmost video layer
var vTrack = seq.videoTracks[vItems-1];
if(vTrack) {
vTrack.insertClip(impItem,0); //Add the item to topmost layer
}
}
}
}
Chris
Circling back to the original question: There's no API about connecting Dynamic Link, but if the same comp from the same project is open in both apps, I think Dynamic Link will happen.
Copy link to clipboard
Copied
If you save the changed .aep in AE, then in PPro call projectItem.refreshMedia() on the projectItem representing an AE comp in that .aep, does it get updated with your changes?
Refresh media: https://github.com/Adobe-CEP/Samples/blob/ed4d4656611780a0dafd98d16fac1d06ad27d8cb/PProPanel/jsx/PPR...
Copy link to clipboard
Copied
I checked this now.
Indeed, I had to re-save the AE project before doing the importAEComps()
Then the dynamic link was established after the RefreshMedia() command.
Many thanks for the help.
Chris
Copy link to clipboard
Copied
Can u say for me, as i don`t know English well, pls
Copy link to clipboard
Copied
Where i can put my question???
Copy link to clipboard
Copied
What question is that?
Copy link to clipboard
Copied
I asked how i can create title where i will ask about my problem. But the problem is that when i SHIFT + B(older versions)(new >> Episod >> render) or in the last Exporting video when all is completed.After that i look at video and see green, purple and ping flickers, all video. And in video any effects
Copy link to clipboard
Copied
That sounds like several distinct issues.
Do any of them have to do with Premiere Pro's APIs?
Copy link to clipboard
Copied
Sorry, what is API`s i don`t know
Copy link to clipboard
Copied
This is the SDK forum, primarily for questions about development using Premiere Pro's APIs.
I suggest untangling the multiple issues you've mentioned above, and searching for help with them on the general Premiere Pro forums.
Copy link to clipboard
Copied
I am trying to find it all day. Can i contact with? I want to sent you photo of problem u will see. I don`t know what to do.
Copy link to clipboard
Copied
You're in a SUB-forum, of the main Premiere Pro forum.
Perhaps Adobe Support can help you, if you can send them a screenshot?
Copy link to clipboard
Copied
How to do it ?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Circling back to the original question: There's no API about connecting Dynamic Link, but if the same comp from the same project is open in both apps, I think Dynamic Link will happen.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now