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
Cheers
Andy