Page 1 of 1

textDocument Object - Apply Stroke

Posted: February 22nd, 2019, 3:00 am
by 2deadfrog
Hello there. I was trying to apply a stroke to the source text via script with something like this:

Code: Select all

var applyStrokeHere = app.project.item(1).layer(1).property("Source Text").value;
applyStrokeHere.applyStroke = true;
or

Code: Select all

var applyStrokeHere = app.project.item(1).layer(1).property("ADBE Text Properties").property("ADBE Text Document").value;
applyStrokeHere.applyStroke = true;
I thought that it's a read/write value. Am I missing something?

In this case I will no be able to use an animator to apply the stroke.

Thank you!

Re: textDocument Object - Apply Stroke

Posted: March 15th, 2019, 3:03 pm
by jordanwade33
It is a read/write value, but doesn't update unless you reset the value after you change some of the properties.

This seems to work like I think you intend it to:

Code: Select all

var source = app.project.item(1).layer(1).property("Source Text");
var applyStrokeHere = source.value;
applyStrokeHere.applyStroke = true;
source.setValue(applyStrokeHere);