Skip to content

patterning

match_aov_pattern(host_name, aov_patterns, render_file_name)

Matching against a AOV pattern in the render files.

In order to match the AOV name we must compare against the render filename string that we are grabbing the render filename string from the collection that we have grabbed from exp_files.

Parameters:

Name Type Description Default
host_name str

Host name.

required
aov_patterns dict

AOV patterns from AOV filters.

required
render_file_name str

Incoming file name to match against.

required

Returns:

Name Type Description
bool

Review state for rendered file (render_file_name).

Source code in client/ayon_core/pipeline/farm/patterning.py
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
def match_aov_pattern(host_name, aov_patterns, render_file_name):
    """Matching against a `AOV` pattern in the render files.

    In order to match the AOV name we must compare
    against the render filename string that we are
    grabbing the render filename string  from the collection
    that we have grabbed from `exp_files`.

    Args:
        host_name (str): Host name.
        aov_patterns (dict):  AOV patterns from AOV filters.
        render_file_name (str): Incoming file name to match against.

    Returns:
        bool: Review state for rendered file (render_file_name).
    """
    aov_pattern = aov_patterns.get(host_name, [])
    if not aov_pattern:
        return False
    return any(re.match(p, render_file_name) for p in aov_pattern)