Table of Contents
Asset Chooser
When a Asset Chooser parameter is selected in the parameters list, the following user interface is displayed:
Asset Chooser parameters can be used to create popup menus where each menu item corresponding to an asset embedded in the FxPack. The parameter must be mapped to a published input String port in the composition. The port is fed the path to the asset. Optionally, the parameter can also be mapped to an index port, which will be fed the current menu selection. As for all other indexes handled by FxFactory and Quartz Composer, the selection index start at zero, corresponding to the first item in the menu.
The Encode file path as option lets you decide whether the path to the asset is encoded as a file URL (e.g. “file:///Users/joe/Desktop/My%20Image.png”) or as a POSIX-style path (e.g. /Users/joe/Desktop/My Image.png”).
The Display option lets you decide whether popup menu items will have a title and/or an image preview.
The Preview size option lets you decide the maximum height or width that a menu item preview may be.
The Preview asset using option lets you control how each preview image is generated from the given asset:
- QuickLook: the preview image is generated via QuickLook, the system-level API that allows users to display a file’s contents without opening it.
- Contents of file: the preview image is generated by loading the given asset as an image file. This option will only work if the assets being used by the parameter are in fact images.
- Finder Icon: the preview image is generated from the file icon.
The Filter assets by option lets you decide which assets will be used inside the popup menu. The available options are:
- File extension: allow all assets that match one of the given file extensions
- Conformance to UTI: allow all assets that conform to the given uniform type identifiers.
- Listing desired assets: build the popup menu by manually adding the assets. When this option is selected, you can also specify menu item titles that are different than the filename; you can also ask FxFactory to generate the preview image from a second asset, an option that comes in handy when the assets being selected aren’t image files.
The Strip filenames of prefix/suffix text fields lets you strip specific strings from the beginning and end of each filename. When FxFactory generates menu entries for each filename, it automatically removes the file extension (e.g. the menu item title for a file named “Image.png” will simply be “Image”). This option lets you remove additional patterns from the filename. For instance, if all the assets you intend to display end with “_special”, you can strip that suffix from the filename when the menu item is generated, for a better user interface.
The Default selection option lets you pick the asset that should be initially selected when the parameter is first displayed to the user. The asset must be compatible with the current filtering methods.
Filtering by File Extension
When filtering the assets by File extension, the following user interface is displayed:
The Allow assets with extension text field lets you enter a list of valid file extensions, separated by space. All assets that match this criteria are selected and filtered according to the other parameter options, and then displayed inside the popup menu.
The Only allow / Don’t allow assets that begin with / end with / contain option lets you filter the list of files according to a search criteria. When the value entered in the text field is left empty, no additional filtering is performed.
Filtering by UTI
When filtering by Conformance to UTI, the following user interface is displayed:
The Allow assets with UTIs text field lets you enter a list of valid uniform type identifiers, separated by space. All assets that conform to one of those UTIs are selected and filtered according to the other parameter options, and then displayed inside the popup menu.
The Only allow / Don’t allow assets that begin with / end with / contain option lets you filter the list of files according to a search criteria. When the value entered in the text field is left empty, no additional filtering is performed.
Listing Desired Assets
When filtering by Listing desired assets, the following user interface is displayed:
Add new menu items by clicking the “Plus” button. Use the first column to pick the asset represented by the menu item. Use the Title column to enter a menu item title. Use the Preview column to select a second asset that will be used to generate the preview image in lieu of the first asset.