Skip to main content
olympica81539219
Inspiring
June 29, 2019
Answered

TimeVarying() for Text Source

  • June 29, 2019
  • 1 reply
  • 2796 views

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.

Correct answer Justin Taylor-Hyper Brew

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);
​




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.

1 reply

Justin Taylor-Hyper Brew
Community Expert
Community Expert
July 1, 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?

olympica81539219
Inspiring
July 1, 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!

Justin Taylor-Hyper Brew
Community Expert
Community Expert
July 1, 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: ੤.)