Copy link to clipboard
Copied
Hi.
The following problem has arisen. exactly in version 24 PPRO.
I have a mogrt with text. if the text is 1 line - it parses without problems (JSON.parse() - everything is fine), but if the text is 2 lines (multistring) - the parsing just fails, not even an error. and only a complete reload of Premiere helps.
There were no such problems in version 23.
I'm glad you have something working for your purposes, and...
We provide API access to motion graphics template parameters (see PProPanel) because their implementation details will change; the API will continue to work, regardless of those changes. Accessing that data directly instead signs you up to deal with potential breakages, with each new release forever. 🙂
Copy link to clipboard
Copied
This will be useless information now, because I don't understand what's going on.
Tried yesterday on 4 different machines, 2 on mac and 2 on vin. on 1 mac only started everything without problems, in other cases not.
After a bunch of possible variations, where I just tried replacing slashes with something else and back again, I somehow still got it to start on another mac. and today I came to try on the same mac and... no. More errors.
Copy link to clipboard
Copied
I'm glad you have something working for your purposes, and...
We provide API access to motion graphics template parameters (see PProPanel) because their implementation details will change; the API will continue to work, regardless of those changes. Accessing that data directly instead signs you up to deal with potential breakages, with each new release forever. 🙂
Copy link to clipboard
Copied
that's great. And it works.
But now how do I change the font size or the font itself?
Copy link to clipboard
Copied
If those were exposed as adjustable parameters by the .mogrt creator, then those component streams can be manipulated using PPro's API.
Copy link to clipboard
Copied
Still don't get it. i've tried seemingly every option except parsing.
I have mogrt, editable text and font parameters. how do I change its size through a script?
var newObjText = JSON.stringify(newObjText, null, 2);
var grafMGT = mogrt.getMGTComponent();
var mogrtText = grafMGT.properties[0];
var getVal = mogrtText.getValue();
// getVal.fontSizeEditValue = [mogrtTextSize];
// mogrtText.fontSizeEditValue = [mogrtTextSize];
// getVal.fontSizeEditValue.setValue([mogrtTextSize], true);
// mogrtText.fontSizeEditValue.setValue([mogrtTextSize], true);
// getVal.fontSizeEditValue.setValue(mogrtTextSize, true);
// mogrtText.fontSizeEditValue.setValue(mogrtTextSize, true);
// getVal.fontSizeEditValue.setValue(mogrtTextSize);
// mogrtText.fontSizeEditValue.setValue(mogrtTextSize);
mogrtText.setValue(newObjText.replace('"', ''));
Copy link to clipboard
Copied
You would find the component parameter stream that corresponds to the font size, and modify that.
[Again, there's no guarantee that the .mogrt creator exposed font size as an editable parameter; if they had, that's how you'd access and modify it.]
Copy link to clipboard
Copied
I created the Mogrt, I know all the editable parameters. So the text is editable and I can change font size and font itself. but now I can't understand how to change font size and font itself without parsing.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now