Copy link to clipboard
Copied
Hi,
A feature in my CEP Panel tries to locate the projectItem of a Motion Graphics Template (MOGRT) in the project. If the projectItem doesn't already exist, it imports the MOGRT from a Creative Cloud Shared Library and then takes the projectItem associated with that. Here's a code snippet from my function, which works on my computer:
var mainSequence = app.project.activeSequence;
var nameToFind = "mogrtToFind"
// findMOGRT() attempts to locate the MOGRT if it already exists in the project. It returns undefined if unsuccessful
var mogrtProjectItem = $.runScript.findMOGRT(app.project.rootItem, nameToFind);
var newMOGRT;
if (typeof mogrtProjectItem == "undefined") {
newMOGRT = mainSequence.importMGTFromLibrary("myLibrary", nameToFind, 0, 1, 1);
// get the projectItem from the newly added MOGRT
mogrtProjectItem = newMOGRT.projectItem;
}
if (typeof newMOGRT != "undefined"){ // remove the temporarily added newMOGRT
newMOGRT.remove(false,true);
}
return mogrtProjectItem;
I'm testing this on some other users' computers, though, and it's failing at the line where importMGTFromLibrary() is called. The call returns an object, but in Premiere's UI I don't see any new MOGRTs in my Sequence or in my bins. I have this function in a try/catch block, and am getting the error TypeError: null is not an object on the devices where it fails.
I'm running out of ideas for why it's working on my device, and not others. I'm using a Macbook Pro, and tested this successfully on a Mac Mini. But it's not working on another Mac Mini, or on a 2013 Mac Pro that I tested it on. I tested both Premiere v.14.4 and Premiere 14.3 on all devices, and ensured the libraries are synchronized in Premiere. The main clues I have at the moment are:
- On the devices where it DOES work, ScriptLayerPPro.EnableNewWorld was set to true by default when I upgraded Premiere to v14.4. When I upgraded to v14.4 on the devices where the functionality DOES NOT work, New World Scripting was set to false by default, but it still did not work after restarting Premiere and restarting the computers as well.
- On the devices where it DOES work, I'm signed into my own Creative Cloud account, and my account is the owner of the Shared Library where I am trying to inport the MOGRT from.
... but I'm not sure how to troubleshoot from there.
Calls to importMGTFromLibrary() were working on those other devices until recently. Is there something that may have gone wrong while upgrading to Premiere 14.4, or maybe something that needs to changed within my Shared Library? Any advice is appreciated, thanks!
Seems to work fine, in current PPro beta (14.6.0x26).
Copy link to clipboard
Copied
For context, here are specs from the Mac Mini where this DOES work:
 
and on the Mac Mini where it DOES NOT work:
 
I'm also running Catalina on my Macbook Pro, where this DOES work.
Copy link to clipboard
Copied
We recently discovered a problem where importMGTFromLibrary() only worked on .mogrts owned by the current PPro user. Fix in progress.
Have you encountered any cases where importMGTFromLibrary() failed, on .mogrts owned by the current user?
Copy link to clipboard
Copied
Ah, that makes sense. So far, importMGTFromLibrary() has worked in all the cases where the current user was the owner of the .mogrts, and has failed otherwise (just tried a third device, and the pattern holds).
Do you have a timeline for the fix, or an alternative workflow in the meantime? In the meantime, I'm considering asking users to import the .mogrt manually into their Sequence from the Libraries or Essential Graphics panels, which should allow my panel to find the corresponding projectItem.
Copy link to clipboard
Copied
Seems to work fine, in current PPro beta (14.6.0x26).
Copy link to clipboard
Copied
Having the same issue. Glad to hear it works in Beta, though! Thank you, Bruce!