Copy link to clipboard
Copied
I'm a beginner writing some code through Adobe-CEP.
I select a clip on a particular video track to configure a code that changes the text inside the clip.
I've succeeded in choosing a graphic clip for subtitles.
Through [targetClip.components], I checked that the contents of the clip contain the text I want to modify in the item "instanceName".
Like {"displayName":"text", "instanceName":"subtitle"}
So I tried to modify the "instanceName"'s value, but it seems that direct modification is not possible because the components are read-only items.
Is there any way to correct this?
Confirming: Your goal is to change the text within an application of a .mogrt, yes?
If so...
You'll need to check that the trackItem is actually from a .mogrt. Here's how PProPanel does that:
https://github.com/Adobe-CEP/Samples/blob/e60d6a22ef44d8eb4cca3904c35a0c050576b697/PProPanel/jsx/PPRO/Premiere.jsx#L1884
Even then, it will only be possible to modify parameter streams that the .mogrt author declared as modifiable.
>Is it possible to modify the contents of the regular text component, not the .mogrt?
There is no API that provides that functionality.
Copy link to clipboard
Copied
Confirming: Your goal is to change the text within an application of a .mogrt, yes?
If so...
You'll need to check that the trackItem is actually from a .mogrt. Here's how PProPanel does that:
https://github.com/Adobe-CEP/Samples/blob/e60d6a22ef44d8eb4cca3904c35a0c050576b697/PProPanel/jsx/PPR...
Even then, it will only be possible to modify parameter streams that the .mogrt author declared as modifiable.
Copy link to clipboard
Copied
Thank you very much for your reply
Is it possible to modify the contents of the regular text component, not the .mogrt?
I added text using the "text tool" inside the Premier Pro without using other external mogrt and created a subtitle clip with effects such as shadow.
After that, I would like to change the contents of the text description component inside the subtitle clip through Adobe-CEP, is there any way?
I can select that clip and can select text component but text component's value is not description but font. text description i want change is in components[i].instanceName.
Copy link to clipboard
Copied
>Is it possible to modify the contents of the regular text component, not the .mogrt?
There is no API that provides that functionality.
Copy link to clipboard
Copied
Thank you very much
Let me ask you one last question.
Then is the function of adding mogrt to the video track implemented in the API?
Like, input [startTime], [EndTime], [VideoTrack] and create Mogrt Clip.
I'm sorry to keep asking you questions.
Copy link to clipboard
Copied
Asking questions is fine!
PProPanel is the best source for PPro ExtendScript API example code; here's PProPanel inserting a .mogrt onto a video track, then changing the .mogrt's editable parameters.
https://github.com/Adobe-CEP/Samples/blob/e60d6a22ef44d8eb4cca3904c35a0c050576b697/PProPanel/jsx/PPR...