Copy link to clipboard
Copied
Hi All
I have an extension which creates media on disk, creates a bin in the current project, and then imports the media to that bin ... nothing fancy.
But since the 11.1 update it no longer imports the media to the targeted bin, instead it it imports it to the root level of the project.
My code for bin creation & targeting (below) is pretty much taken from the PProPanel importFiles : function sample.
var targetBin = app.project.rootItem.createBin(binName);
targetBin.select();
This worked without issue until the recent 11.1 update.
I've grabbed the latest version of the PProPanel sample from Github and have noted the addition to the code in that function:
// New in 11.1; you can determine which bin will be targeted, before importing.
var currentTargetBin = app.project.getInsertionBin();
if (currentTargetBin.nodeId === app.project.rootItem.nodeId){
// If we're here, then the target bin is the root of the project.
}
If I'm understanding that correctly the I can use that new functionality to find out where (Premiere thinks) the files will be added, with:
$.writeln(targetBin.nodeId);
$.writeln(app.project.getInsertionBin().nodeId);
And sure enough, the nodeId returned for my "targetBin" is the same as the nodeId returned for app.project.getInsertionBin().
Nonetheless, since 11.1, my files are always imported to the root folder and not the targeted bin.
So I've just tested the "Import Files" function directly from the PProPanel extension ... and, on my system at least, it's exhibiting the exact same behaviour as my own panel i.e. it's importing the selected files to the project root, not targeting the "'Targeted by PProPanel import" import bin.
Bugger.
Is this an issue with the sample code itself, or do you think it might be due to the possible bug in 11.1 noted below
Re: Importing video files into a BIN no longer works in CC 2017 Spring Edition
Cheers
Andy
Looks like you guys fixed this issue with app.project.importFiles() in 11.1.2 and forward, is that correct? Just trying to figure out which versions I should have my workaround code execute for. Thanks!
Copy link to clipboard
Copied
Any confirmation on this issue available?
Many thanks in advance
Andy
Copy link to clipboard
Copied
The issue is with Premiere Pro in general, not just the API. We're working on it.
Copy link to clipboard
Copied
Tanks Bruce.
Copy link to clipboard
Copied
Bruce Bullis wrote
The issue is with Premiere Pro in general, not just the API. We're working on it.
Is it just me or was this fixed in 2017.1.1?
Copy link to clipboard
Copied
Unfortunately, I don't think this issue was addressed yet... or at least, it wasn't working for me yesterday, on my 2017.1.1 Windows box.
Copy link to clipboard
Copied
andymees@aje wrote
Unfortunately, I don't think this issue was addressed yet... or at least, it wasn't working for me yesterday, on my 2017.1.1 Windows box.
Hmm... I wonder if this is a Windows-only affliction? I'm on a Mac and have not been able to replicate the issue - it works fine for me. 😕
Copy link to clipboard
Copied
I have been able to repro on Mac. I can't provide any specifics, but we're working on it. Keep watching the skies...
Copy link to clipboard
Copied
Not sure if this is related, but I'm finding in 2017.1.1 that if a bin is not expanded in the Project view then it won't be found by ProjectItem.getInsertionBin()... If I expand the bin, then it will will be properly returned by that function.
This occurs whether selection was performed by the user or by using the ProjectItem.select() function.
Known issue? Same issue? New issue?
Is there a way to expand a ProjectItem in the Project view programmatically?
Copy link to clipboard
Copied
Looks like you guys fixed this issue with app.project.importFiles() in 11.1.2 and forward, is that correct? Just trying to figure out which versions I should have my workaround code execute for. Thanks!