Skip to content

OTIOExportUI

OTIOExportUI

Bases: TaskUIBase

Source code in client/ayon_hiero/api/startup/Python/Startup/otioexporter/OTIOExportUI.py
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
57
58
59
60
61
62
63
64
65
66
67
68
class OTIOExportUI(hiero.ui.TaskUIBase):
    def __init__(self, preset):
        """Initialize"""
        hiero.ui.TaskUIBase.__init__(
            self,
            OTIOExportTask,
            preset,
            "OTIO Exporter"
        )

    def includeMarkersCheckboxChanged(self, state):
        # Slot to handle change of checkbox state
        hiero_export.include_tags = state == QtCore.Qt.Checked

    def populateUI(self, widget, exportTemplate):
        layout = widget.layout()
        formLayout = FormLayout()

        # Hiero ~= 10.0v4
        if layout is None:
            layout = formLayout
            widget.setLayout(layout)

        else:
            layout.addLayout(formLayout)

        # Checkboxes for whether the OTIO should contain markers or not
        self.includeMarkersCheckbox = QCheckBox()
        self.includeMarkersCheckbox.setToolTip(
            "Enable to include Tags as markers in the exported OTIO file."
        )
        self.includeMarkersCheckbox.setCheckState(QtCore.Qt.Unchecked)

        if self._preset.properties()["includeTags"]:
            self.includeMarkersCheckbox.setCheckState(QtCore.Qt.Checked)

        self.includeMarkersCheckbox.stateChanged.connect(
            self.includeMarkersCheckboxChanged
        )

        # Add Checkbox to layout
        formLayout.addRow("Include Tags:", self.includeMarkersCheckbox)

__init__(preset)

Initialize

Source code in client/ayon_hiero/api/startup/Python/Startup/otioexporter/OTIOExportUI.py
28
29
30
31
32
33
34
35
def __init__(self, preset):
    """Initialize"""
    hiero.ui.TaskUIBase.__init__(
        self,
        OTIOExportTask,
        preset,
        "OTIO Exporter"
    )