有没有办法在扩展脚本中更改字符串中特定单词的字体颜色以产生后效? [英] Is there a way to change font color of a specific word in a string, in extendscript for after effects?
本文介绍了有没有办法在扩展脚本中更改字符串中特定单词的字体颜色以产生后效?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可以成功更改整个文本层的字体颜色,但找不到改变字符串中特定单词的颜色的方法.
I can change the font color of the entire text layer successfully, but I cannot find a way to change the color of a specific word in a string.
例如 在此字符串尝试学习后效应的扩展脚本"中,我只想更改学习"的颜色.
For e.g. In this string "Trying to learn extendscript for after effects", I want to change the color of "learn" only.
var mySourceText =
currItem.layers.byName('line04').property("ADBE
Text Properties").property("ADBE Text Document");
var myTextDoc = mySourceText.value;
myTextDoc.fillColor = [0.5,0.5,0];
mySourceText.setValue(myTextDoc);
但这会改变整个文本层的颜色.
But this would change the color of the entire text layer.
有没有可能的解决方案?预先感谢.
Is there a possible solution to it? Thanks in advance.
推荐答案
不!您无法为文本图层中的特定文本设置这些属性.
Nope! You can't set these properties for specific pieces of text in a text layer.
这篇关于有没有办法在扩展脚本中更改字符串中特定单词的字体颜色以产生后效?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文