Multi-line Text

The Multi-line Text parameter feeds a single string value to the Quartz composition published input it is mapped to. Each line can be extracted by using the String Components patch and entering the Return character as the separator (type Option-Return). When a Mult-line Text parameter is selected in the parameters list, the following user interface is displayed:

The Default text entry field lets you choose an initial string of text to be used by the parameter when the plug-in is first applied. Contrary to the simpler Text Field parameter, the Multi-line text parameter accepts text which spans multiple lines.

The Allow importing from field lets you specify a list of space-separated UTIs (uniform type identifiers) or file extensions that will determine the types of text files that can be imported by the user. When no UTIs or file extensions are specified, the parameter will allow the user to import any standard text file (txt, rtf, rtfd). Any style information is stripped during the process.

Text Importer Rules

The text importing process can be customized through the use of text processing rules defined in the last section of the parameter configuration UI.

Each entry in the list has text fields to specify a UTI (uniform type identifier), a space-separated list of file extensions, and a reference to a text processing rule, stored as a file in the product’s Assets.

When a text file is imported by the user, FxFactory will evaluate rules in the list until it finds a match. The conditions for matching a rule to a given file are evaluated from left to right, and they are increasingly restrictive:

  1. If a UTI has been provided, the rule will be applied only if the imported file matches that type. Leave the UTI field empty if the rule should be applied to any imported file.
  2. If a list of space-separated file extensions has been provided, the rule is applied only if the file has one of those extensions. Leave the “File Extensions” value empty to have the rule applied regardless of the file extension.

It is best to have no rules with overlapping/conflicting criteria, because the list is evaluated in no guaranteed order, and only the first matching rule is applied.

Currently, only XSLT files (ending with the “.xsl” extension) can be selected for the Rule Asset value. XSLT (Extensible Stylesheet Language Transformations) defines a standard for manipulating XML documents to generate other XML documents, HTML, plain text, etc.

XSLT on Wikipedia

On-screen Control

Multi-line text parameters are available via on-screen UI in Final Cut Pro X and Motion 5. By default, a single button lets the user choose edit the text associated with the parameter. Users can hold down the Option key to import an existing text file instead.