A Quartz Composer patch is similar to a routine in a traditional programming language—a patch is a base processing unit that executes and produces a result. A custom patch is one that you write by subclassing the QCPlugIn class. To make a custom patch available in the Quartz Composer patch library, you need to package it as a plug-in—an NSBundle object—and install in the appropriate directory. If you’d like, you can package more than one custom patch in a plug-in. You don’t need to create a user interface for a custom patch. When Quartz Composer loads your plug-in, it creates the user interface automatically for each custom patch in the plug-in so that custom patches have the same look in the workspace as the patches that are built in to Quartz Composer.
This chapter provides a discussion of custom patches and gives an overview of the tasks you need to perform to create a custom patch. You’ll see which aspects of your code give rise to the user interface for a custom patch. By the end of the chapter you should have a fairly good idea of how to get started writing your own custom patches. Then you can read “Writing Processor Patches” and “Writing Consumer Patches” to find out how to write specific kinds of patches.
A Close Look at the Patch User Interface
From Custom Patch Code to Patch User Interface
Property and Port Data Types
Internal Settings
Custom Patch Execution
The QCPlugIn Template in Xcode
Packaging, Installing, and Testing Custom Patches
Last updated: 2007-12-11