Convert Paragraph Text to Point Text | Extended Script

Participant ,
Nov 14, 2021 Nov 14, 2021

Copy link to clipboard

Copied

Hi, I am trying to create a script that will allow creating point text from paragraph text. Everything is ready, but I ran into the fact that the anchor point works differently for them and when I create point text from paragraph text, it rises crooked

I have attached the code and screenshot where you can see the difference.
Having the same values, they are displayed differently.

Harchenko_0-1636904785579.png

 

var project = app.project;
var comp = project.activeItem;

var layer = comp.selectedLayers[0];

var layerName = layer.name;

var textProp = layer.property("Source Text");

var textDocument = textProp.value;

var textString = textDocument.toString();

var textPos = layer.property("ADBE Transform Group").property("ADBE Position").value;

var textAnchor = layer.property("ADBE Transform Group").property("Anchor Point").value;

var textTrans = layer.property("Transform");

var nexTextLayer = comp.layers.addText(textString);
//var ntexAnchor = nexTextLayer.property("ADBE Transform Group").property("ADBE Anchor Point").setValue(textAnchor);
var ntexPos = nexTextLayer.property("ADBE Transform Group").property("ADBE Position").setValue(textPos);
var ntexAP = nexTextLayer.property("ADBE Transform Group").property("Anchor Point").setValue(textAnchor);

 

TOPICS
Scripting

Views

62

Likes

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
no replies

Have something to add?

Join the conversation