word文本樣式代碼樣式_使用文本樣式表達創建真相來源

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:

例:

Image for post

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.pswp.cn/news/274733.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/274733.shtml
英文地址,請注明出處:http://en.pswp.cn/news/274733.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

mvn備忘

創建web工程 mvn archetype:generate -DgroupIdcom.malangmedia -DartifactIdautoDeployToJetty -DarchetypeArtifactIdmaven-archetype-webapp -Dversion1.0 添加jetty插件 <project xmlns"http://maven.apache.org/POM/4.0.0" xmlns:xsi"http://www.w3.or…

前端框架源碼解讀之Vite

前端工具鏈十年盤點&#xff1a;https://mp.weixin.qq.com/s/FBxVpcdVobgJ9rGxRC2zfgWebpack、Rollup 、Esbuild、Vite ?webpack: 基于 JavaScript 開發的前端打包構建框架&#xff0c;通過依賴收集&#xff0c;模塊解析&#xff0c;生成 chunk&#xff0c;最終輸出生成的打包…

hp-ux_UX中的格式塔-或-為什么設計師如此討厭間距

hp-uxI’ve been lucky so far in my design career to have worked with engineers that seem genuinely interested in learning about design. Perhaps, as mentioned in the title, it’s more about them trying to figure out why it matters so much to us that there i…

很多人都不知道,其實博客園給我們博客開了二級域名

如題。一直都在郵件簽名里寫自己的博客地址為&#xff1a; http://www.cnblogs.com/datacool&#xff1b;直到有天突然發現使用&#xff1a;http://datacool.cnblogs.com也可以訪問。不知道的趕緊測試&#xff0c;后者明顯要酷很多啊。該不是我是最后一個知道的吧&#xff0c;知…

JavaScript 數組新增 4 個非破壞性方法!

大家好&#xff0c;我是若川。持續組織了8個月源碼共讀活動&#xff0c;感興趣的可以點此加我微信 ruochuan12 參與&#xff0c;每周大家一起學習200行左右的源碼&#xff0c;共同進步。同時極力推薦訂閱我寫的《學習源碼整體架構系列》 包含20余篇源碼文章。歷史面試系列。另外…

自行車改裝電動車怎么樣_電動車聽起來應該是什么樣?

自行車改裝電動車怎么樣The sound of an all-electric car accelerating doesn’t have to sound like a standard combustion engine, It could sound like anything.全電動汽車加速的聲音不必聽起來像是標準的內燃機&#xff0c;它可以聽起來像任何東西。 These were the wor…

C++中的三種繼承public,protected,private(轉)

三種訪問權限 public:可以被任意實體訪問 protected:只允許子類及本類的成員函數訪問 private:只允許本類的成員函數訪問 三種繼承方式 public 繼承 protect 繼承 private 繼承 組合結果 基類中 繼承方式 子類中 public &#xff06; public繼承 > public public &#xff0…

如何碎片化時間學前端,了解前沿趨勢

我很開心在前端行業認識了一批優秀且樂于分享的朋友&#xff0c;他們的技術分享與職業觀點讓我獲益良多&#xff0c;推薦給大家一起關注。程序員成長指北Node.js 前端工程化 低代碼考拉小姐姐&#xff0c;一個有趣且樂于分享的人&#xff01;目前就職于某知名外企&#xff0c;負…

谷歌pay破解_Google Pay缺少Google聞名的一件事-UX案例研究

谷歌pay破解Disclaimer: The views expressed in the blog post is purely based on personal experience. It was not influenced by any external factor.When Google launched Tez (now Google Pay) in India during 2017, their primary goal was to design a simple payme…

進階高級前端,這位大前端架構師一定不能錯過

今天給大家介紹一位好朋友&#xff1a;這波能反殺&#xff1a;一位擁有十年工作經驗&#xff0c;對學習方法有獨到理解的資深大前端架構師。一、博客早在 2017 年初&#xff0c;波神在簡書平臺以《前端基礎進階》為名&#xff0c;更新了一系列優質文章&#xff0c;獲得大量認可…

memcached應用策略(轉)

memcached應用策略&#xff08;轉&#xff09;(2012-04-05 11:10:02) 轉載▼標簽&#xff1a; memcached 應用策略 it分類&#xff1a; linux_c memcached應用策略memcached 主要的作用是為減輕大訪問量對數據庫的沖擊&#xff0c;所以一般的邏輯是首先從memcached中讀取數據&a…

突然討厭做前端,討厭代碼_為什么用戶討厭重新設計

突然討厭做前端,討厭代碼重點 (Top highlight)The core of design thinking is to only design something that will bring value and fill the gap in consumer needs. Right? Why else would one design something that no one asked for? While that may be true to some …

那些年我面過的「六年經驗」的初級工程師

大家好&#xff0c;我是若川。持續組織了8個月源碼共讀活動&#xff0c;感興趣的可以 點此加我微信ruochuan12 參與&#xff0c;每周大家一起學習200行左右的源碼&#xff0c;共同進步。同時極力推薦訂閱我寫的《學習源碼整體架構系列》 包含20余篇源碼文章。歷史面試系列。另外…

sql反模式分析2

第八章 多列屬性目標&#xff1a;存儲多值屬性 為一個bug設置多個標簽反模式&#xff1a;創建多個列&#xff0c;為bugs創建tag1&#xff0c;tag2&#xff0c;tag3幾個列保存標簽。標簽必須放于其中一個。1.查詢數據&#xff0c;比如搜索這三列&#xff0c;可以使用in語句2.添…

更多信息請關注微信公眾號_為什么我們更多地關注表面異常?

更多信息請關注微信公眾號Don’t you feel lucky to find a single seasoned curly fry in your bunch of plain old boring french fries? Do you remember highlighting important texts of your study materials before the exams? Both situations might seem irrelevant…

eclipse中的漢字極小的解決方案(轉載)

eclipse中的漢字極小的解決方案(轉載) 可能新裝了eclipse后&#xff0c;寫java代碼的時候發現&#xff0c;寫注釋的時候發現&#xff0c;漢字小的可憐&#xff0c;網上搜一下&#xff0c;又是改字體又是設置字體大小&#xff0c;試用后發現都不是針對這個的方法。 無奈在自己摸…

面試官經常問的觀察者模式如何實現~

大家好&#xff0c;我是若川。持續組織了8個月源碼共讀活動&#xff0c;感興趣的可以 點此加我微信ruochuan12 參與&#xff0c;每周大家一起學習200行左右的源碼&#xff0c;共同進步。同時極力推薦訂閱我寫的《學習源碼整體架構系列》 包含20余篇源碼文章。歷史面試系列。另外…

旅行者 問題_門檻項目:沒有旅行者回到他的原籍城市。

旅行者 問題Sohini Mukherjee| MFA| Spring 2020Sohini Mukherjee | 外交部| 2020年Spring Artivive app to see the full Artivive應用程序可查看完整的#AR experience.#AR體驗。 Prompt:提示&#xff1a; As second semester, first year graduate students, you are at a …

產品經理懂技術=流氓會武術(zz)

最近七年&#xff0c;我都在做互聯網產品&#xff0c;其中前五年分別在創業公司和上市公司里&#xff0c;做別人的產品&#xff1b;近兩年在創業&#xff0c;做自己的產品。 我的體會是&#xff1a;產品經理需要懂技術&#xff0c;創業者尤其需要。但前提是你總覺得有股憋不住的…

技術人的七大必備特質

大家好&#xff0c;我是若川。持續組織了8個月源碼共讀活動&#xff0c;感興趣的可以 點此加我微信ruochuan12 參與&#xff0c;每周大家一起學習200行左右的源碼&#xff0c;共同進步。同時極力推薦訂閱我寫的《學習源碼整體架構系列》 包含20余篇源碼文章。歷史面試系列。另外…