Quantcast
Channel: Adobe Community : Discussion List - After Effects Scripting
Viewing all articles
Browse latest Browse all 2143

How to edit a text Master Property via ExtendScript?

$
0
0

Hi,

 

This seems basic, but I can't figure it out. I can't change the value of my text Master Property, via Extendscript. I tried treating the property the same way I would treat the Source Text property of a text layer, but After Effects doesn't like this.

 

var newText = new TextDocument("This is new text.");

 

var myLayer = myComp.layer("Title Text"); //This is my comp with the master properties.

var myLayer2 = myComp.layer("Text 1"); //This is my text layer.

 

var myProp = myLayer.masterProperty("Text");

var myProp2 = myLayer2.sourceText;

 

myProp2.setValue(newText); //This is changing the text of the text layer and works.

myProp.setValue(newText); //This is changing the text of the master property and doesn't work.

 

 

The error I get in Extendscript is "After Effects error: invalid text layer."

 

I would appreciate any help.


Viewing all articles
Browse latest Browse all 2143

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>