|
<< Click to Display Table of Contents >> Navigation: Nodes > Tasks > Classifiers > Classify By Metadata
|
This node classify the input files by the designed metadata token. You can put the metadata token in the Data Type property, and its possible values in the Output List property. There are also filter modes available such as Exact Match, Starts With, Contains, Ends With.
Example:
If we pass this file to this node: /vol1/media/MyTesting4.mp4
And we set these properties:
Data Type: name
Output List: Devel, Test, Production
Filter Mode: Contains
Then the classified file will go trough the Test output connector, because the file name token contains Test.
Or if we want to match directory names of the path then we have to use the filePath token rather than name. For example if you want to match Testing in a file path like: /vol1/Testing/MyName.mp4
But in this case you should include the sub-directory slashes and put /Testing/ in the Output List, to ensure that it only matches a folder. Otherwise it would also match the file name as in the first example(MyTesting4.mp4).
The list of available metadata tokens is dynamic and it depends on the type of files passed to this node and the metadata injected by previous nodes. An easy way to see what tokens are available to your input connector is to connect it to a pyPrintInputs node first, which will output all its metadata in the script editor panel.
files: To connect the files to be classified. For example you can connect a folder node, a watcher node, etc.
value0, value1,...value4: Route incoming files trough the output connector matching its name with the metadata value. (value0 ..value4 is just the initial template, you can rename connectors as needed in the Output List property, which can have any number of values, or by selecting a preset).
other: files matching other values not explicitly defined in the Output List property are sent trough this connector.
notFound: files with undefined Data Type metadata property are sent trough this connector.
Preset: To select different presets to filter by. Resolution, Fps or Custom
Data Type: The metadata token to be used for the classification. You can either use the Preset property to load it (which contains a few examples), or use the custom Preset and then type the metadata token of your interest. Do not use brackets, just type the metadata token.
Output List: List of possible output values for the Data Type field. Each value will automatically add an output connector of the same name. In the Fps preset example the Output List will contain typical fps values such as 24, 25, 29.97, etc. But you can add other values or remove unnecessary ones.
Case sensitive: Decides if the classification is case sensitive or not.
Filter Mode: Matching rule to use for the comparison: Exact Match, Starts With, Contains, Ends With.
Error mode: When no matching is found, this property defines what kind of error message will be sent to the error log (None, Info, Warning, Critical). This is mainly to facilitate user scripts parsing render log files later (or human monitoring). But note that this is just a log message, the case Critical will not stop the workflow execution because this node provides its own error control branches via the other connector (when the output connectors do not cover all the possible outcomes).
Note: All those messages / errors are shown in the Render Log panel, and they are also saved to the daily log file under the SGO AppData/workflows/log folder, which you could then parse based on their error type using external scripts.
Property Label |
Property ID |
Preset |
preset |
Data Type |
dataType |
Output List |
outputList |
Filter Mode |
filterMode |
Case Sensitive |
caseSensitive |
Use Decorated Values |
useDecoratedValues |
Error Mode |
errorMode |