• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Is there a way can modify read-only components in Adobe-CEP?

New Here ,
Mar 06, 2023 Mar 06, 2023

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?

TOPICS
SDK

Views

602

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Adobe Employee , Mar 06, 2023 Mar 06, 2023

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.

Votes

Translate

Translate
Adobe Employee , Mar 07, 2023 Mar 07, 2023

>Is it possible to modify the contents of the regular text component, not the .mogrt?


There is no API that provides that functionality.

Votes

Translate

Translate
Adobe Employee ,
Mar 06, 2023 Mar 06, 2023

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 06, 2023 Mar 06, 2023

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Mar 07, 2023 Mar 07, 2023

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 07, 2023 Mar 07, 2023

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Mar 07, 2023 Mar 07, 2023

Copy link to clipboard

Copied

LATEST

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...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines