Skip to content

validate_camera_pointgroup

Validate Camera Point Group.

ValidateCameraPoingroup

Bases: InstancePlugin

Validate Camera Point Group.

There must be a camera point group in the scene.

Source code in client/ayon_equalizer/plugins/publish/validate_camera_pointgroup.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
class ValidateCameraPoingroup(pyblish.api.InstancePlugin):
    """Validate Camera Point Group.

    There must be a camera point group in the scene.
    """

    order = ValidateContentsOrder
    hosts: ClassVar[list] = ["equalizer"]
    families: ClassVar[list] = ["matchmove"]
    label = "Validate Camera Point Group"

    def process(self, _: pyblish.api.Instance) -> None:
        """Process the validation."""
        valid = any(
            tde4.getPGroupType(point_group) == "CAMERA"
            for point_group in tde4.getPGroupList()
        )
        if not valid:
            error_msg = "Missing Camera Point Group"
            raise PublishValidationError(error_msg)

process(_)

Process the validation.

Source code in client/ayon_equalizer/plugins/publish/validate_camera_pointgroup.py
23
24
25
26
27
28
29
30
31
def process(self, _: pyblish.api.Instance) -> None:
    """Process the validation."""
    valid = any(
        tde4.getPGroupType(point_group) == "CAMERA"
        for point_group in tde4.getPGroupList()
    )
    if not valid:
        error_msg = "Missing Camera Point Group"
        raise PublishValidationError(error_msg)