Skip to content

create_matchmove

Create Matchmove product.

CreateMatchMove

Bases: EqualizerCreator

Create Match Move subset.

Source code in client/ayon_equalizer/plugins/create/create_matchmove.py
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
class CreateMatchMove(EqualizerCreator):
    """Create Match Move subset."""

    identifier = "io.ayon.creators.equalizer.matchmove"
    label = "Match Move"
    product_base_type = "matchmove"
    product_type = product_base_type
    icon = "camera"

    def get_instance_attr_defs(self) -> list:
        """Return instance attribute definitions."""
        camera_enum = [
            {"value": "__all__", "label": "All Cameras"},
            {"value": "__current__", "label": "Current Camera"},
            {"value": "__ref__", "label": "Reference Cameras"},
            {"value": "__seq__", "label": "Sequence Cameras"},
        ]
        camera_list = tde4.getCameraList()
        camera_enum.extend(
            {"label": tde4.getCameraName(camera), "value": camera}
            for camera in camera_list
            if tde4.getCameraEnabledFlag(camera)
        )
        # try to get list of models
        model_enum = [
            {"value": "__none__", "label": "No 3D Models At All"},
            {"value": "__all__", "label": "All 3D Models"},
        ]
        point_groups = tde4.getPGroupList()
        for point_group in point_groups:
            model_list = tde4.get3DModelList(point_group, 0)
            model_enum.extend(
                {
                    "label": tde4.get3DModelName(point_group, model),
                    "value": model,
                } for model in model_list
            )
        return [
            EnumDef("camera_selection",
                    items=camera_enum,
                    default="__current__",
                    label="Camera(s) to publish",
                    tooltip="Select cameras to publish"),
            EnumDef("model_selection",
                    items=model_enum,
                    default="__none__",
                    label="Model(s) to publish",
                    tooltip="Select models to publish"),
        ]

get_instance_attr_defs()

Return instance attribute definitions.

Source code in client/ayon_equalizer/plugins/create/create_matchmove.py
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
def get_instance_attr_defs(self) -> list:
    """Return instance attribute definitions."""
    camera_enum = [
        {"value": "__all__", "label": "All Cameras"},
        {"value": "__current__", "label": "Current Camera"},
        {"value": "__ref__", "label": "Reference Cameras"},
        {"value": "__seq__", "label": "Sequence Cameras"},
    ]
    camera_list = tde4.getCameraList()
    camera_enum.extend(
        {"label": tde4.getCameraName(camera), "value": camera}
        for camera in camera_list
        if tde4.getCameraEnabledFlag(camera)
    )
    # try to get list of models
    model_enum = [
        {"value": "__none__", "label": "No 3D Models At All"},
        {"value": "__all__", "label": "All 3D Models"},
    ]
    point_groups = tde4.getPGroupList()
    for point_group in point_groups:
        model_list = tde4.get3DModelList(point_group, 0)
        model_enum.extend(
            {
                "label": tde4.get3DModelName(point_group, model),
                "value": model,
            } for model in model_list
        )
    return [
        EnumDef("camera_selection",
                items=camera_enum,
                default="__current__",
                label="Camera(s) to publish",
                tooltip="Select cameras to publish"),
        EnumDef("model_selection",
                items=model_enum,
                default="__none__",
                label="Model(s) to publish",
                tooltip="Select models to publish"),
    ]