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

TimeVarying() for Text Source

Explorer ,
Jun 29, 2019 Jun 29, 2019

hey im making a Premiere  CEP plugin thats allow you to manipulate effects on clips to achieve more complex fx using Math and logics,

currently i i got camera movement fx and staff like that (of course it has tons of keyframes lol).

today i got to mess around with the text "effect".

i know it is kinda new and works weirdly relative to other effects,

but i did manage to control and manipulate the text source (change the text itself),

and also to manipulate the 'Tracking' to my will using script.(thats the things i want to animate)

the thing is that from some reason the "TimeVarying()" return an error.

and after small check i found out that "areKeyframesSupported()" return false.

which is weird  because at Premiere Pro using the 'Effect Control' panel you can add keyframes to the 'Source Text' in the Text effect.

(yea it doesnt really animate it and its more like jumping from state to state as its move from keyframe to keyframe but it should work in script if i will use very fast keyframes with small change in values..)

i dont know if it is a bug or im missing something..

any help will be great!

thanx.

TOPICS
SDK
2.6K
Translate
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

Community Expert , Jul 01, 2019 Jul 01, 2019

Yea, it doesn't look like source text interpolates at the moment, but most of the properties like Font, Alignment, etc don't interpolate in AE either, only do hold keyframes basically. So if you wanted an effect of cycling through fonts or something like that, you could make that with a ton of individual keyframes.

Which properties are you trying to animate specifically?

Translate
Community Expert , Mar 24, 2025 Mar 24, 2025

Funny, I completely forgot about this discussion, but it was almost 6 years ago so guess that's why.

 

Tried today and looks like this "hack" no longer works in the current version of Premiere. Likely the text encoding has changed or something.

 

I wouldn't recommend going down this path too far, it's undocumented and as we've seen subject to change so even if you could get it working today it could break in the near future without any warning since it's not an offical API.

 

I'd wait till Adobe

...
Translate
Community Expert ,
Jul 01, 2019 Jul 01, 2019

Yea, it doesn't look like source text interpolates at the moment, but most of the properties like Font, Alignment, etc don't interpolate in AE either, only do hold keyframes basically. So if you wanted an effect of cycling through fonts or something like that, you could make that with a ton of individual keyframes.

Which properties are you trying to animate specifically?

Translate
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
Explorer ,
Jul 01, 2019 Jul 01, 2019

First of all thanx for answering,

And yea i do want it to act like keyframe holds.

The property that im trying to animete is the "text source"

(the property that contain a huge text in JSON look-alike form (it is a string) with all the text's font, size, tracking, etc)

Basicly it is the "property[0]" in the Text effect.

And as i said earlier i cant activate the TimeVarying() for that property ..

Thanx again!

Translate
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
Community Expert ,
Jul 01, 2019 Jul 01, 2019

Hmm, might not be possible with the current API. Can you post your full snippet so I can test on my end? (I'm not seeing any JSON type data from text source, just an unknown character: ੤.)

Translate
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
Explorer ,
Jul 01, 2019 Jul 01, 2019

Yea that the wired part,

If you take that string you get ('੤') from the GetValue()  and split it at the 5 or 6 letter (cant remember, im currntly on a trip so i cant access the code i wrote) you will get a string that you can actually read, that string is looking like json but its isnt realy json.

(i dont know what is the first 5 characters tho)

I know its sounds wierd. Just use it like this:

Var sourceTextVal = propertie[0].getValue().substring(5);

Translate
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
Community Expert ,
Jul 01, 2019 Jul 01, 2019

Woah, nice detective work! Yea so if you split after the 4th character you can parse the JSON string:

JSON.parse(app.project.activeSequence.videoTracks[0].clips[0].components[3].properties[0].getValue().substring(4));

Translate
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
Explorer ,
Jul 01, 2019 Jul 01, 2019

Yep already know that xD.

You can also use setvalue and its actually works and update the text source

(you just need to keep it as the original text was before - with the first 4 letters)

I used string.replace to maintaine the correct string while chaneging things like the text itself.

I just need to find a way to actually use keyframes on it.

Thats my problem T.T

Got any idea how?

Translate
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
Community Expert ,
Jul 02, 2019 Jul 02, 2019

Hmm, looks like a bug to me: sourceText.isTimeVarying() always returns false even if the stopwatch is enabled and keyframes exist for all the text properties. Also, sourceText.setTimeVarying(true) returns "Bad argument setTimeVarying" on Source Text and appears to do nothing for the rest of the Text properties.

@bbb_999 Can you confirm this behavior?

Translate
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
Contributor ,
Sep 08, 2023 Sep 08, 2023

Hi, were you able to change the MOGRT text that was created in PP?

I can get the values ​​in the 2019 version of PP. But when I try to replace the values, I get nothing instead of text, although the new text contains new values, when I get it again

Translate
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
Explorer ,
Mar 14, 2024 Mar 14, 2024

hey did you find any solution for your quary , i am also goin through same problem 

 

Translate
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
Explorer ,
Mar 22, 2025 Mar 22, 2025

hi @Justin Taylor-Hyper Brew  can you plz help me in this code , i am trying to  acess the source text for the ppro graphics layer for a log time now, as you discussed that "if you split after the 4th character you can parse the JSON string" but i am only getting a single charecter for 

"jsonObjPart" here is the code      
 
var seq = app.project.activeSequence;
var jsonVal = seq.videoTracks[0].clips[0].components[3].properties.getParamForDisplayName("Source Text").getValue();
var jsonObjPart = jsonVal.substring(0, 4);
alert(jsonObjPart)
var jsonObj = JSON.parse(jsonVal.substring(4));
jsonObj.mTextParam.mStyleSheet.mText = "This is a new text";
var jsonOutstr = JSON.stringify(jsonObj);
var jsonOutstr = jsonObjPart + jsonOutstr;
seq.videoTracks[0].clips[0].components[2].properties.getParamForDisplayName("Source Text").setValue(jsonOutstr, true);
​



Translate
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
Community Expert ,
Mar 24, 2025 Mar 24, 2025

Funny, I completely forgot about this discussion, but it was almost 6 years ago so guess that's why.

 

Tried today and looks like this "hack" no longer works in the current version of Premiere. Likely the text encoding has changed or something.

 

I wouldn't recommend going down this path too far, it's undocumented and as we've seen subject to change so even if you could get it working today it could break in the near future without any warning since it's not an offical API.

 

I'd wait till Adobe adds text layer cappabilities to UXP or rely on MOGRT text layers for now which are scriptable.

Translate
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
Explorer ,
Mar 26, 2025 Mar 26, 2025
LATEST

ok Sir, thanks for the confermation 

Translate
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