Patch Groups & Components
Save time by abstracting frequently used patches, building a library of reusable patches, and sharing it with your team.
Group patches to reduce clutter and encapsulate a group of patches that perform a function. Similar to creating functions in programming. To group multiple patches into one, select them and choose Patch > Group Patches ⌘G. Layer property patches cannot be grouped into a patch group - to build patch groups with layers, use components.
To enter a patch group, double-click it or press ⌘↓. To leave it and go back, press ⌘↑. Menu items for entering and leaving a patch group are Patch > Enter Patch Group and Patch > Leave Patch Group.
Patch Group Inputs and Outputs
To add, edit, re-order or remove the individual inputs and outputs, select the patch group and choose Patch > Patch Info ⌘I to bring up the Patch Info popover. The Port Setup tab allows you to change the port type and the default, maximum and minimum values of your port.
To publish inputs or outputs from inside a patch group, select a port and choose Patch > Publish Port P. This will add a purple or blue patch that represents an input or output on the patch group.
Components are similar to patch groups, but they contain layers as well. Use components to create re-usable building blocks like buttons, tool bars, tab bars, list items, etc. For example, the iOS and Android components in Origami Studio are components built using patches and layers.
To create a component, select layers and choose Layer > Group into Component ⌘⌥G. This will group them into a component in the layer list. Enter and leave the component using ⌘↓ and ⌘↑. Copy and paste patches into the component to encapsulate existing logic in patch editor. Create inputs and outputs using the Patch Info Popover ⌘I. Use the Touch menu to access the outputs of components.
If you have a patch group or a component that you use over and over, it may make sense to add it to your patch library. Select the patch group or component and choose Patch > Add to User Patch Library ⌘⌥C. Reveal the patch library folder by choosing Patch > Show Patch Folder.
Once a patch group or component is in your library, you will be able to add it the same way as you add other patches and layers next time you start or open a document. To make it available in your current document, close and re-open it.
Updating Patch Groups and Components
To make changes or add functionality to a patch group or component in your library, insert the patch or component to your document, make your changes and choose Patch > Add to User Patch Library again. Close and re-open any documents using this patch group or component, and Origami Studio will prompt you to upgrade the patches to the new version.
Make one-off changes to any patch or component by unlinking it from the library. Select the patch or component and choose Patch > Unlink from Patch Library ..
Tip: Tag Ports to Maintain Connections When Upgrading Patches
To get more granular control over how inputs and outputs get mapped to new unes during patch upgrade, assign a number to a port as a port tag in Port Setup tab in Patch Info popover. Origami Studio will match a port to one with corresponding tag in the previous version of the patch, even if you started building the new version of the patch from scratch. Components also have a number of special port tags available in the dropdown menu - for example, using the Enable tag will reveal the eye icon on your component for quick enabling or disabling.
Platform-specific Patch Groups and Components
To limit a patch or component to a platform, specify a platform in the Patch Setup tab of the Patch Info popover. This will make your patch or component available only if the current device matches the chosen platform.
Sharing a Folder of Patches and Components
To make patches and components accessible to other team members, create a shared Dropbox folder and add your patches and components to it. To save a patch in your document to a shared folder, hold down ⇧ while opening the Patch menu and choose Add to Other Library.
Members of the team can add this folder to the list of loaded libraries using the + button in Systems tab in Origami Studio preferences.