opencolorio_config_aces.filter_ctl_transforms#

opencolorio_config_aces.filter_ctl_transforms(ctl_transforms, filterers=None)[source]#

Filter given ACES CTL transforms with given filterers.

Parameters:
  • ctl_transforms (dict or list) – ACES CTL transforms as returned by opencolorio_config_aces.classify_aces_ctl_transforms() or opencolorio_config_aces.unclassify_aces_ctl_transforms() definitions.

  • filterers (array_like, optional) – List of callables used to filter the ACES CTL transforms, each callable takes an ACES CTL transform as argument and returns whether to include or exclude the ACES CTL transform as a bool.

Returns:

\[\left[CTLTransform_1, \ldots, CTLTransform_n\right]\]

Return type:

list

Warning

  • This definition will forcibly unclassify the given ACES CTL transforms and return a flattened list.

Examples

>>> ctl_transforms = classify_aces_ctl_transforms(
...     discover_aces_ctl_transforms())
>>> sorted(  
...     filter_ctl_transforms(ctl_transforms, [lambda x: x.genus == 'p3']),
...     key=lambda x: x.path)[0]
CTLTransform('odt...p3...InvODT.Academy.P3D60_48nits.ctl')