09-Origami中文幫助-Workflow-Patch Organization

Dosen原創

這是我學習quartz composer,Origami,看官方文檔翻譯下來的,每天一篇,有不準確的地方希望能指出,一起交流進步。轉載請與我聯系,擅自轉載視作侵權。


Patch Organization? ? ? 模塊組織


It's easy to get lost in all the crossing cables. Here are some tips to help you organize your document.

在交錯的連線中很容易找不到頭緒,這里是一些小技巧,可以幫你組織你的文件。



Name patches ? ? ? 重命名模塊


You can give any patch a custom name by double clicking the title or selecting the patch and pressing?. It's often helpful to give patches names that describe what they're doing in the context of your prototype. For example, if you had a Switch patch responsible for switching a photo between a thumbnail (off) and full screen state (on), you could name the Switch "Photo is Fullscreen". It would be clear immediately what that chain of patches is responsible for and what the on state of the Switch represents.

你可以對任何模塊通過雙擊標題或選擇模塊并按下?來自定義名字,給模塊一個名字來形容它在你原型中的作用往往是很有用的。例如,如果你有一個開關模塊負責切換一個圖片的縮略圖和全屏狀態,你可以給Switch一個名字“圖片全屏”,它會清晰直接地表示模塊負責什么,開關代表的什么狀態。



Create notes ? ? ?創建注釋


Notes can be useful to describe what sections of patches are responsible for in your prototype. Add a node by right-clicking on the document and selectingAdd Note....

注釋對于描述模塊在原型中的作用很有用。在文件上點擊右鍵,選擇添加注釋。



Organize patches left to right ? ? ?從左到右組織模塊


Since patches take inputs from the left and output to the right, it makes sense to arrange them from left to right. Generally blue patches always on the right, since they don't have outputs.

因為模塊從左端輸入并且在右端輸出,所以有理由把它們從左至右的排列。一般藍色模塊往往在右邊,因為它們沒有輸出。

Organizing all Layers so they are vertically stacked in their Layer order will help make the document more readable. Use??or??to align patches arranged in a column.

組織所有層按照它們的順序垂直的堆疊會讓文件更有可讀性。使用 ?? 或 ?? 使模塊成一列。



Group related Layers to reduce cable clutter ?將有關聯的層成組減少混亂的線


UseLayer Groupsto hold multiple Layers that animate together. For example, if you're sliding up a window with multiple layers inside of it, putting those layers in a layer group will let you just animate up that one group up instead of needing to have cables connected to several different layers.

將一起動畫的一些層使用Layer Groups(層組)成組。例如:如果你一個有很多層在里面的窗口,把那些層放在一個Layer Groups里,你只要給這一個組動畫就可以了,而不必用線連接很多不同的層。



Use wireless patches to broadcast common values ?使用無線模塊播送通用值


Wireless BroadcasterandWireless Receivercan send values across your composition without the use of cables. A Broadcaster will make a value available anywhere in the same document. A Receiver can receive a value from any Broadcaster.

無線播送器和無線接收器可以不通過連線發送一個值越過你的組合。一個播送可以讓一個值在同一個文件中的任何地方都有效。一個接收器可以接收來自任何播送器的值。

There are a couple types of values that are particularly useful to broadcast:

這里是一些特別適用播送功能的類型的值:

~Static values?used in different places across your prototype. For example, say you had a padding value that you used to lay out a bunch of different parts of your UI. You'd just need to change one broadcaster and the different elements of your prototype would adjust accordingly.

~靜態值穿過你的原型用在不同的地方。例如:如果你有一個填充值用于展示你UI的一堆不同的部分,你只需要改變一個播送器,這些你原型的不同的組成部分就會相應的調整。

~State values?from patches like Switch, Index Switch, Counter, Conditional, etc. It's common to use the same state value in several different places in your composition - so it's often helpful to name it through the wireless system and have access to it anywhere on the graph.

~例如開關模塊的狀態值,計數,條件,等。它常用于在你的組合中幾個不同的地方使用了相同的狀態值-所以它經常在通過無線系統進行命名時很有用并且在圖表上任何地方都能進入。

Create a Broadcaster by pressingWwhile hovering on an output, or on a blank space in the document. A Broadcaster made from an output will automatically inherit the type, whereas a Broadcaster on a blank space will default to Virtual (which means you need to manually change it to a different type with Patch Settings?2if you want to assign it a value directly).

當懸停在一個輸出上或者在文檔空白的地方時按下‘w’來創建一個播送器。由輸出創建的播送器自動地繼承類型,而在空白地方創建的播送器默認是虛擬的(也就意味著,如果你想要直接給它賦值就需要手動地通過模塊設置?2改變它的類型)。

Create a Receiver by pressingWwhile hovering on an input. It will automatically be connected to the last-placed Wireless Broadcaster (however the name may not be reflected until you deselect the Receiver). You can change the Broadcaster in thePatch Settings?2in the dropdown.

當懸停在輸入時按‘w’創建一個接收器,它會自動地連接最后放置的播送器(然而直到你取消選中的接收器前名字并不能反射)。你可以在模塊設置?2的下拉菜單里改變播送器。



Macros to hide complex logic ? ? ?用宏隱藏復雜的邏輯


Similarly to grouping Layers, you can useCreate Macroto create bundles of logic. Generally you should group logic that when combined has an easily described purpose, for example "Scroll Speed Detector". You can make Macros within Macros as well.

類似于給層打組,你可以使用Create Macro創建邏輯的包。通常給有共同目的的邏輯打組,比如"滾動速度監測器"。你也可以在一個宏內創建宏。

“宏”的概念大概類似于,由幾個模塊組成可以實現一個功能或作用,那么組合以來,以后用這個功能時,直接調用這個宏,而不需要重新組合一遍模塊。

Often when you group, the labels of the ports are unhelpful and generic. Rename the ports by selecting the Macro and pressing?3to accessInput & Output Settings. Double-click on a port to rename.

經常當你打組時,接口的標簽是沒用的,選住這個宏并按下?3進入Input & Output Settings里重命名接口。在接口上雙擊重命名。

Sometimes you may have a Macro that you keep using over and over again. In these cases it may make sense to add it to yourPatch Library. Once you've made a Macro, go into the Macro, select all the patches and hitAdd to Library. Fill in the information (the patch preview will show incorrect names for the inputs/outputs at first). Once you've added it, you can re-use it anywhere — even share it with teammates.

有時候,如果你一遍又一遍地使用一個宏,把它添加進你的模塊庫也許更有意義。進入你制作的這個宏力,選擇所有模塊然后點擊Add to Library,填上信息。如果你添加到了庫,你可以在任何地方使用它,甚至把它分享給你的團隊成員。



Publishing inputs and outputs ? ? ?發布輸入和輸出


With Layer Groups and Macros, it maybe confusing at first how to send values in or out of the group. You can publish inputs/outputs up a level by right-clicking on a patch and selecting the port you want to publish, or by hovering on a port and pressingP.

Layer Groups和Macros,可能一開始會困惑如何讓一個值從一個組輸入或輸出,你可以在一個模塊上右鍵點擊發布輸入/輸出來使這個屬性在上一層級也能看到,選擇你想要發布的接口,或者懸停在一個接口上按下‘P’。

這個功能在使用層組和宏時,非常有用,比如:你有一個可以自定義位移距離的特定動畫的宏,那么這個宏需要一個接口輸入一個值,一個接口輸出結果,但是這兩個接口在宏內部,這時,你需要把這兩個接口上升一個層級,在宏上顯示,就需要用到這個功能了。

However, right-clicking does not work to send inputsfrom the outsideinto a Layer Group/Macro. Instead, you can drag any cable onto a Layer Group/Macro, and it will automatically create a splitter within that is published with the name you enter.

然后,右鍵點擊無法讓外面的輸入進入到一個層組/宏中。可替代的是,你可以拖拽任何線到一個層組/宏上,然后它會讓你輸入一個名字并自動的創建一個分流器來完成發布。

You can reorder and rename the ports on a Layer Group/Macro by accessingInput & Output Settings(select the patch,?3). Drag the port names to reorder.

你可以通過Input & Output Settings對層組/宏上的接口重新排序或命名(選中模塊,?3),拖動接口的名字重新排列。

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市,隨后出現的幾起案子,更是在濱河造成了極大的恐慌,老刑警劉巖,帶你破解...
    沈念sama閱讀 230,106評論 6 542
  • 序言:濱河連續發生了三起死亡事件,死亡現場離奇詭異,居然都是意外死亡,警方通過查閱死者的電腦和手機,發現死者居然都...
    沈念sama閱讀 99,441評論 3 429
  • 文/潘曉璐 我一進店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人,你說我怎么就攤上這事。” “怎么了?”我有些...
    開封第一講書人閱讀 178,211評論 0 383
  • 文/不壞的土叔 我叫張陵,是天一觀的道長。 經常有香客問我,道長,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 63,736評論 1 317
  • 正文 為了忘掉前任,我火速辦了婚禮,結果婚禮上,老公的妹妹穿的比我還像新娘。我一直安慰自己,他們只是感情好,可當我...
    茶點故事閱讀 72,475評論 6 412
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著,像睡著了一般。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發上,一...
    開封第一講書人閱讀 55,834評論 1 328
  • 那天,我揣著相機與錄音,去河邊找鬼。 笑死,一個胖子當著我的面吹牛,可吹牛的內容都是我干的。 我是一名探鬼主播,決...
    沈念sama閱讀 43,829評論 3 446
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了?” 一聲冷哼從身側響起,我...
    開封第一講書人閱讀 43,009評論 0 290
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后,有當地人在樹林里發現了一具尸體,經...
    沈念sama閱讀 49,559評論 1 335
  • 正文 獨居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內容為張勛視角 年9月15日...
    茶點故事閱讀 41,306評論 3 358
  • 正文 我和宋清朗相戀三年,在試婚紗的時候發現自己被綠了。 大學時的朋友給我發了我未婚夫和他白月光在一起吃飯的照片。...
    茶點故事閱讀 43,516評論 1 374
  • 序言:一個原本活蹦亂跳的男人離奇死亡,死狀恐怖,靈堂內的尸體忽然破棺而出,到底是詐尸還是另有隱情,我是刑警寧澤,帶...
    沈念sama閱讀 39,038評論 5 363
  • 正文 年R本政府宣布,位于F島的核電站,受9級特大地震影響,放射性物質發生泄漏。R本人自食惡果不足惜,卻給世界環境...
    茶點故事閱讀 44,728評論 3 348
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧,春花似錦、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 35,132評論 0 28
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至,卻和暖如春,著一層夾襖步出監牢的瞬間,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 36,443評論 1 295
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留,地道東北人。 一個月前我還...
    沈念sama閱讀 52,249評論 3 399
  • 正文 我出身青樓,卻偏偏與公主長得像,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當晚...
    茶點故事閱讀 48,484評論 2 379

推薦閱讀更多精彩內容

  • **2014真題Directions:Read the following text. Choose the be...
    又是夜半驚坐起閱讀 9,769評論 0 23
  • 一場雪將天空洗藍 洗凈了故鄉的俏容顏 我是那樣刻心蝕骨的愛著你 陽光象老父親慈詳的眼 雖然我明白在時代的新顏里 我...
    金星狼閱讀 262評論 0 0
  • 首先,接受自己的本身膚質.皮膚受遺傳影響很大.也就是說很大程度上是爹媽給的. 每一個愛美的女生都多多少少有些護膚強...
    凈喜77閱讀 580評論 0 1
  • 我很丑,可是我很溫柔,外表冷漠內心狂熱那就是我! 我很丑,可是我很溫柔,一點卑微一點懦弱可是從不退縮! 我很丑,可...
    依無所依閱讀 413評論 0 0
  • 最近一直在啃《稀缺-我們是如何陷入貧窮與忙碌的》這本書,讓我們從新的角度來認識稀缺,為什么會形成稀缺心態,以及如何...
    Sarah與書閱讀 296評論 0 0