Copy link to clipboard
Copied
I'm working on automatically inserting MOGRTs and setting values programatically with a script.
I don't see anywhere in the official docs for how to do this.
https://ppro-scripting.docsforadobe.dev/index.html
The only MOGRT related function I see on here at all is "getMGTComponent" which is to select components and properties of an already-inserted MOGRT trackItem.
Now, I AM actually familar with the sequenceItem.importMGT method. I wonder tough, has this function been deprecated? I can't find it in the docs. And I am having some issues getting it to work.
The issue I am having with importMGT is that in addition to adding the MOGRT to the timeline, it ALSO imports duplicate projectItems into the project of the entire track V1 up to that point. (FWIW, I am inserting the MOGRT on V2).
Any idea why this might be?
Thanks,
-dv
There have been no changes to, or deprecation of, importMGT(). It's a documentation bug; we'll add it, thanks!
>...Any idea why this might be?
None. 🙂
Please send a .prproj, a .mogrt, and ExtendScript snippet that reliably reproduce the problem, and we'd be happy to take a look.
Copy link to clipboard
Copied
There have been no changes to, or deprecation of, importMGT(). It's a documentation bug; we'll add it, thanks!
>...Any idea why this might be?
None. 🙂
Please send a .prproj, a .mogrt, and ExtendScript snippet that reliably reproduce the problem, and we'd be happy to take a look.
Copy link to clipboard
Copied
Great thanks Bruce. On that note, it looks like "importMGTFromLibrary" is also not in the docs. The only thing that turns up "mogrt" in a search is TrackItem.getMGTComponent()
I am using non-traditional scripting workflow actually-- a third party python package called Pymiere. It basically maps python functions into extend script and sends commands to Premiere. So the issue about the duplicate project Items may a bug related to that.
Copy link to clipboard
Copied
> I am using...Pymiere.
[Developer sees that PPro integration requires ExtendScript, hosted via a web page, based on JavaScript]: "I know what this needs! ANOTHER layer of language abstraction!"
😉
Kidding!
I love Python, and given its popularity in the post/VFX community, am unsurprised at the Pymiere effort.
Happy to investigate specific failure cases, given the requested info.
Copy link to clipboard
Copied
Haha! I'm actually a big fan of this Pymiere library. I've become proficient with Python in the last couple years and am trying to stay in that ecosystem as much as possible. Python + Sublime Text + Command line is my workflow for the most part.
Anyway, if you are curious, here is the issue:
The function call in my python script (using Pymiere)...
mgt_clip = self.active_sequence.importMGT(
path=mogrt,
time=timeline_in_ticks,
videoTrackIndex=vid_track_index,
audioTrackIndex=aud_track_index)
And then the corresponding Pymiere code is here:
to find it quickly, ctrl-f: "importMGT"
https://github.com/qmasingarbe/pymiere/blob/master/pymiere/objects/premiere_objects.py
I've isolated just this function in my program and here is what it is doing:
-The MOGRT gets dropped onto the timeline.
-A bin called "Motion Graphics Template Media" is created wiht the corresponding MOGRT projectItem inside.
-(unexpected result-->) Every other footage track item alrady on the timeline is also added to the "Motion Graphics Teplate Media" bin as a redundant projectItem.
This footage already existed in a bin called "Footage," but after importing the mogrt, I now have repeat project items represtenting the same footage. For what its worth, deleting ANY "instance" of these project items issues the same "clip references in one or more sequences" warning from Premiere. Following through on any, also deletes the corresponding footage in the sequence.
Is that helpful? I can share sample code and project files, but unless you're in an actual Pymiere workflow, I'm not sure if it will help.
Copy link to clipboard
Copied
Something that may be involved, yet has nothing to do with APIs:
In the Media Browser's hamburger menu, does changing this setting impact the behavior you're seeing?
Copy link to clipboard
Copied
It does not. And was unchecked prior to all this as well. Hmm...
Copy link to clipboard
Copied
Darn; worth a shot.
I don't think waiting to dust off my Python skills will help anyone...
Can I have a .prproj and a .mogrt, and steps that reliably repro the issue?
Copy link to clipboard
Copied
That's the thing. I think the only part of this equation that "reliably reproduces the issue" is pymiere.
Something getting jumbled in the API call is my guess.