PPROLint

Options

Turn thresholds and lists into settings with a default value, and use them in conditions and messages.

An option is a value of the rule that you can change without touching its checks: a threshold, a switch, a list of allowed names. Conditions compare with it, messages show it, and its default is the value the rule uses.

The Options section of the Tiny clips rule: minFrames (Number, 3), includeAudio (Yes/no, Yes) and includeAdjustmentLayers (Yes/no, No), each with a description

Add an option

Click Add option. A row appears with:

  • Name: how conditions and messages refer to it, as options.<name>. Use a short word without spaces, such as maxSpeed or includeAudio. Two options cannot share a name.
  • Type: what the option holds (see below).
  • Default: the value the rule uses.
  • Description: what the option changes, for whoever adjusts the rule later.

The trash button at the right of the row removes the option.

Types

The Type list: Number, Text, Yes/no, List of numbers, List of texts, JSON
TypeHoldsThe default is entered as
Numbera number, such as a limita number. Infinity and -Infinity are accepted.
Texta word or a sentencetext.
Yes/noa switchYes or No.
List of numbersseveral numbers, such as frame ratesa list (see below).
List of textsseveral words, such as effect or file namesa list (see below).
JSONa structured value, read by computed scopes onlyJSON text.

Changing the type keeps the default when it still fits, and resets it otherwise.

Lists

A list default shows its values as tags. Type a value in the box under them and press Enter to add it; click the × of a tag to remove it.

The allow option of Duplicate effects: type List of texts, with tags AE.ADBE Crop and AE.ADBE Geometry2 and AE.ADBE Lumetri typed in the box

JSON

Some built-in rules, such as Required markers, take a JSON option: a list of requirements, each with several properties. Its default is edited as JSON text; the editor says Not valid JSON. until the text parses. The option's description says what the value must look like.

The markers option of Required markers: type JSON, default [] in a text area, and a description of the expected requirement objects

Use an option

An option is a field named options.<name>, available wherever fields are:

  • In a condition, as the value: open the value list with its arrow and pick the option. It is listed with the fields of the same type, in the options group. See Conditions.
  • In a message, as the placeholder {options.<name>}, from the menu. See Messages.
  • In diagnostic data, to attach the threshold to every report. See Data.

A list option is used with is one of and is not one of.

A switch for part of a rule

A Yes/no option can turn a part of the rule on or off. The built-in Tiny clips rule checks audio clips only when includeAudio is on: its condition holds for a video clip, or when the option is on.

The condition of Tiny clips: All of clip.duration is greater than 0, clip.durationFrames is less than options.minFrames, Any of (clip.trackType is video, options.includeAudio is Yes), Any of (clip.adjustmentLayer is No, options.includeAdjustmentLayers is Yes)

Renaming an option

The editor does not rename the uses of an option. After renaming one, every condition, message or data entry still using the old name shows a problem, Unknown field "options.…": pick the new name there too.

In a rule file

Options are the options object of the rule file, { "type", "default", "description" } per name. The types are number, string, boolean, number[], string[] and json. See Options.

On this page