word文本样式代码样式

As of After Effects 17.0, you can use expressions to edit text styles in After Effects. Here’s why this would transform your workflow:

从After Effects 17.0开始,您可以使用表达式在After Effects中编辑文本样式。 这就是这将改变您的工作流程的原因:

  1. Title Design: Link multiple text layers to one source of truth, for consistency and precision.标题设计:将多个文本层链接到一个事实来源,以保持一致性和准确性。
  2. Save time: Don’t waste your precious mental energy and hours of the day clicking into individual text layers, Character and Paragraph panels, or even expression sliders controlling your text.节省时间:不要浪费您宝贵的精力和一天中的几个小时单击单个文本图层,“字符”和“段落”面板,甚至控制文本的表达滑块。
  3. Create Motion Graphics Templates (mogrts): Link your source(s) of typographic truth to the Essential Graphics panel, so that you or others can edit them with flexibility in After Effects and Premiere.创建运动图形模板(迁移):将印刷真相源链接到“基本图形”面板,以便您或其他人可以在After Effects和Premiere中灵活地对其进行编辑。

Example:

例:

You have three text layers. You want to maintain the same styling and source text for all, but you want to control Paragraph Alignment in the Essential Graphics panel.

您有三个文本层。 您希望为所有对象保留相同的样式和源文本,但是要在“基本图形”面板中控制“段落对齐”。

For the skeptics: Yes, you can manually change the paragraph alignment, but you’re likely pushing the same copy to multiple comps at various sizes. The After Effects gods gave us new features so that maybe we can work more precisely and intelligently. Keep things simple for simpler projects, and go a little complex for more complex projects.

对于怀疑者:是的,您可以手动更改段落的对齐方式,但是您可能会将同一副本推入各种大小的多个伴奏中。 After Effects神灵为我们提供了新功能,以便我们可以更精确,更智能地工作。 对于较简单的项目,请保持简单;对于较复杂的项目,则应使它变得有些复杂。

Recipe:

食谱:

  1. Use expressions to link the three text layers to one master text layer (your source of truth).使用表达式将三个文本层链接到一个主文本层(您的真相来源)。
  2. Create a Dropdown Menu Control with Paragraph Alignment options.使用段落对齐选项创建一个下拉菜单控件。

Add this expression to each of the three text layers:

将此表达式添加到三个文本层中的每个:

var t = thisComp.layer("MASTER TITLE").text.sourceText; var fontSize = t.style.fontSize; var leading = t.style.leading; style = t.style; styleA = style.setFontSize(fontSize); styleB = styleA.setText(t); styleC = styleB.setLeading(leading);

var t = thisComp.layer("MASTER TITLE").text.sourceText; var fontSize = t.style.fontSize; var leading = t.style.leading; style = t.style; styleA = style.setFontSize(fontSize); styleB = styleA.setText(t); styleC = styleB.setLeading(leading);

Explanation, line by line:

逐行说明:

var t = thisComp.layer("MASTER TITLE").text.sourceText;

var t = thisComp.layer("MASTER TITLE").text.sourceText;

Declare a variable, t, and return the value of your master text layer’s sourceText.

声明一个变量t,并返回主文本层的sourceText的值。

var fontSize = t.style.fontSize;

var fontSize = t.style.fontSize;

Declare a variable, fontSize, and return the fontSize of t.

声明一个变量fontSize ,并返回t的fontSize。

var leading = t.style.leading;

var leading = t.style.leading;

Declare a variable, leading, and return the leading of t.

声明一个变量, leading ,并返回t的领先。

style = t.style;

style = t.style;

Adding style to the end is the same as using getStyleAt(0); which means to get the style of t at Character Index 0. You can also use getStyleAt(n, x); to return the Character Index at Time (n = character index, x = time in seconds).

最后添加style与使用getStyleAt(0); 您也可以使用getStyleAt(n, x);来获取字符索引0处的t样式getStyleAt(n, x); 返回时间的字符索引(n =字符索引,x =以秒为单位的时间)。

The variables styleA, styleB, and styleC combine Set Functions using the variables we declared above: fontSize, sourceText, and leading. I’ve separated each style for clarity, but you can also write everything in longform.

变量styleA,styleB和styleC使用我们上面声明的变量fontSet,sourceText和Lead组合了Set函数。 为了清楚起见,我将每种样式分开,但您也可以用长格式编写所有内容。

Now that we’ve linked the text layers to a single style, let’s create a Dropdown Menu Control so that we can access Left, Center, or Right paragraph alignment in the Essential Graphics Panel.

现在,我们已经将文本图层链接到一个样式,现在我们创建一个下拉菜单控件,以便我们可以在Essential Graphics Panel中访问Left,Center或Right段落对齐方式。

Use this expression on the opacity of your text layers (but make sure their visibility is still turned on):

在文本图层的不透明度上使用此表达式(但请确保它们的可见性仍处于打开状态):

var x = thisComp.layer("CONTROL").effect("paragraphAlign")("Menu").value; if (x == 1) 100; else 0

var x = thisComp.layer("CONTROL").effect("paragraphAlign")("Menu").value; if (x == 1) 100; else 0

Explanation, line by line:

逐行说明:

var x = thisComp.layer("CONTROL").effect("paragraphAlign")("Menu").value;

var x = thisComp.layer("CONTROL").effect("paragraphAlign")("Menu").value;

Declare a variable x, and return the value of a Dropdown Menu Item. The value of a Dropdown Menu item is always a number, even if you rename the label.

声明一个变量x,并返回一个下拉菜单项的值。 即使重命名标签,“下拉菜单”项的值也始终是数字。

if (x == 1) 100; else 0

if (x == 1) 100; else 0

If x is equal 1, the opacity will be 100. Otherwise, it will be zero.

如果x等于1,则不透明度将为100。否则,它将为零。

Note that you may encounter the triple equals operator, or the strict equality operator, ===, e.g., x === 1. This operator is special because it tests for both value (e.g., 5) and type (e.g., number).

请注意,您可能会遇到三重等于运算符或严格等于运算符=== ,例如x === 1 。 该运算符很特殊,因为它同时测试值(例如5)和类型(例如数字)。

In this example, x === 1 will still work. However, if you type x === "1", then the test will return false because the Dropdown Menu item values are always numbers, not strings.

在此示例中, x === 1仍然有效。 但是,如果键入x === "1" ,则测试将返回false,因为下拉菜单项的值始终是数字,而不是字符串。

Done! Now read more about text styling expressions over at Adobe.

做完了! 现在,在Adobe上阅读有关文本样式表达的更多信息。

Originally published at https://bytanchan.com on March 21, 2020.

最初于 2020年3月21日 https://bytanchan.com 发布

翻译自: https://uxdesign.cc/creating-your-source-of-truth-with-text-styling-expressions-ee38bebe7c35

word文本样式代码样式


http://www.taodudu.cc/news/show-894009.html

相关文章:

  • hp-ux_UX中的格式塔-或-为什么设计师如此讨厌间距
  • 突然讨厌做前端,讨厌代码_为什么用户讨厌重新设计
  • 旅行者 问题_门槛项目:没有旅行者回到他的原籍城市。
  • figma下载_在Figma中进行原型制作的技巧和窍门
  • 不想当全栈的设计师不是_但我不想成为产品设计师
  • ux和ui_我怎么知道UI / UX是否适合我?
  • vs2017字体最佳选择_如何为下一个项目选择最佳字体? 一个简单的游戏
  • ui设计中的版式设计_设计中的版式-第3部分
  • ucla ai_UCLA的可持续性:用户体验案例研究
  • ui设计颜色的使用_UI设计中颜色使用的10条原则
  • 如何设置ad18捕捉图标_图标设计中的像素捕捉
  • 插图 引用 同一行两个插图_为什么插图是产品的重要组成部分
  • 祖父元素_帮助祖父母建立Skype帐户的UX经验教训
  • 分布式实物实现方式_这是您完成实物产品设计任务的方式
  • figma下载_在Figma上进行原型制作的各种触发选项
  • ux和ui_如何为您的UX / UI设计选择正确的原型制作工具
  • figma下载_我如何使用Figma,CSS Grid和CSS Flexbox构建登录页面
  • 使命召唤ios_使命召唤的精巧UI:战地
  • 鲸鱼网络连接_登陆鲸鱼:在网络上读书,第1部分
  • 静态原型设计 加载中_见解1:原型设计有助于填补静态设计留下的空白。
  • 最优资产组合步骤_重新设计投资组合网站之前,请按照以下5个步骤进行操作
  • sketch放入app组件_使用Sketch App设计CSS网格
  • 猎鹰spacex_我如何重新创建SpaceX仪表板UI
  • 页面滚动时触发图片逐帧播放_如何在滚动效果上创建逐帧运动图像
  • 1812:网格_指导设计:网格的历史
  • python 投资组合_成功投资组合的提示
  • 屏幕广播系统_如何设计系统,而不是屏幕
  • Futura:从纳粹主义到月球-甚至更远
  • 爬取淘宝定价需要多久时间_如何对设计工作进行定价—停止收​​取时间并专注于价值
  • 昆虫繁殖_“专为昆虫而生” –好奇!

word文本样式代码样式_使用文本样式表达创建真相来源相关推荐

  1. css字体样式代码大全_这都2020年了,还没了解CSS?

    对于新人来说想要了解css,就要从最基本的入手了解,讲真的学习css入门很简单,学习html和css短时间后你就可以制作一个网页,深入的去学习的话,就会很难.他就是从简--深--深--简的一个过程,如 ...

  2. html文本框代码高亮,CodeMirror 编辑器文本框 TextArea 代码高亮插件 - 文章教程

    CodeMirror 是一个用于编辑器文本框 TextArea 代码高亮 JavaScript 插件,为各种编程语言实现关键字.函数.变量等代码高亮显示,丰富的 API 和可扩展功能以及多个主题样式, ...

  3. 用java统计英文文本的单词个数_统计文本英文单词总个数,并列出每个单词的个数...

    package test; /* * Task :统计文本英文单词总个数,并列出每个单词的个数 * * Date:2014.02.26 * *Author:璀若星辰 * */ import java. ...

  4. python 文本框内容变化_当文本框中的文本发生变化时,动态读取文本输入中的文本?...

    我是kivy新手,我正试图用python编写一个应用程序,有一次,每当textinput被更改时,我都要从textinput读取文本,基于此,我想实现我的按钮功能-我已经看过所有文档,但我不知道怎么做 ...

  5. java 文本分析 关键词提取_从文本中提取关键字

    就在前几天的任务中用到了从文本描述中提取关键字的操作,特意从网上找到了一些提取关键字的方法. 总结如下:需要引入jieba这个库文件 基于TF-IDF算法进行关键词提取 importjieba.ana ...

  6. vscode创建代码截图_如何在VSCode中创建代码配置文件

    vscode创建代码截图 This post piggybacks off of the work done by @avanslaars who is a fellow instructor at ...

  7. wangEditor富文本编辑器的调用开发实录2(V5版本自定义粘贴,去除复制word或网页html冗余样式代码的解决方案)

    wangEditor富文本编辑器:自定义粘贴,去除复制word或网页html冗余样式代码的解决方案 1.环境说明 2.解决方案 3.完整代码 总结 在使用wangEditor富文本编辑器时,当从wor ...

  8. div方框弯曲边样式_使用弯曲样式编辑文本

    div方框弯曲边样式 Would you like a new Notepad replacement that incorporates the latest technologies while ...

  9. html input文本框样式,css设置input文本框样式代码实例_html/css_WEB-ITnose

    css设置input文本框样式代码实例: 使用css设置input元素的样式是最为常用的操作之一,当然也是最为基础的操作,可能对于刚刚接触css的朋友还不够熟悉,下面就通过一段简单的代码历史演示一下如 ...

最新文章

  1. php静态方法调用变量吗,php静态方法怎么调用非静态变量?
  2. python官网下载步骤视频-Python 实现视频下载
  3. codeforces gym-101755 I-Guess the Tree 交互题、分治、树的直径
  4. 解锁Android性能优化的五大误区!满满干货指导
  5. java校招面试题_java校招面试编程题及答案.docx
  6. B站在港交所挂牌上市 12名UP主共同敲钟
  7. r语言ggplot2一夜多图_跟着Nature microbiology学画图~R语言ggplot2画直方图
  8. RHEL6本地YUM源配置
  9. hive 正则表达式详解
  10. 计算机汉字区位码十进制,[计 算 机]汉字区位码\国标码\机内码之间的换算
  11. project不显示里程碑标志_Project教程 在Project软件中如何让里程碑任务显示更直观...
  12. 苹果手机itunes显示无法连接服务器,苹果手机无法连接到iTunes Store怎么办 连接失败解决方法...
  13. 洛谷P2306 被yyh虐的mzc
  14. 推荐几款电脑测试软件
  15. docker搭建minio
  16. Ramnit感染型病毒分析与处置
  17. Sql Server 03
  18. Android写入txt文件
  19. 神经网络计算机的用途是,神经网络计算机的应用
  20. vpython 贞测碰撞_球碰撞vPython问题

热门文章

  1. java delegate怎么写_美团面试官:你说你们公司的Mybatis分页插件是你写的,给我说说它的设计原理?...
  2. 计算机基础及msoffice应用好考吗,全国计算机等级考试考试一级WPS Office和MS Office有什么不同?那个好考?...
  3. python123查找指定字符输入m_大数据应用人才培养系列教材 Python语言 刘 鹏 张 燕 总主编 李肖俊 主编 刘 河 钟 涛 副主编....
  4. omitting directory `folder/'
  5. C#开发移动应用系列(2.使用WebView搭建WebApp应用)
  6. 一些应该记住的东西(持续更新?再也不会更新了)
  7. JVM——类加载机制
  8. Bootstrap系列 -- 41. 带表单的导航条
  9. 开源组件DocX导出Word
  10. [WPF疑难] 继承自定义窗口