Exemplo n.º 1
0
 def populateUI(self, widget, exportTemplate):
     TranscodeExporterUI.populateUI(self, widget, exportTemplate)
     form_layout = TaskUIFormLayout()
     layout = widget.layout()
     layout.addLayout(form_layout)
     form_layout.addDivider('Ftrack Options')
     self.addFtrackTaskUI(form_layout, exportTemplate)
Exemplo n.º 2
0
    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)
Exemplo n.º 3
0
 def addFtrackProcessorUI(self, widget, export_items):
     '''Add custom ftrack widgets to parent *widget* for given *export_items*.'''
     form_layout = TaskUIFormLayout()
     layout = widget.layout()
     layout.addLayout(form_layout)
     form_layout.addDivider('Ftrack Options')
     self.add_task_templates_options(form_layout)
     self.add_project_options(form_layout)
     self.add_task_type_options(form_layout, export_items)
     self.add_asset_type_options(form_layout)
     self.add_asset_name_options(form_layout)
     self.add_thumbnail_options(form_layout)
     self.add_reviewable_options(form_layout)
     self.set_ui_tweaks()
Exemplo n.º 4
0
    def populateUI(self, widget, exportTemplate):
        '''PopulateUIExport dialog to allow the TaskUI to populate
        a QWidget with the ui *widget* neccessary to reflect the current preset.
        '''
        NukeShotExporterUI.populateUI(self, widget, exportTemplate)

        form_layout = TaskUIFormLayout()
        layout = widget.layout()
        layout.addLayout(form_layout)
        form_layout.addDivider('Ftrack Options')

        self.addFtrackTaskUI(form_layout, exportTemplate)
        self.addTaskSelector(form_layout, exportTemplate)

        self._nodeSelectionWidget.setHidden(True)
        self._timelineWriteNode.setHidden(True)
Exemplo n.º 5
0
    def __init__(self, session, error_data, missing_assets_types,
                 duplicated_components):
        '''Return a validator widget for the given *error_data* and *missing_assets_types*.'''
        super(FtrackSettingsValidator, self).__init__()

        self.setWindowTitle('Validation error')
        self._session = session

        self.logger = logging.getLogger(__name__ + '.' +
                                        self.__class__.__name__)

        ftrack_icon = QtGui.QIcon(':/ftrack/image/default/ftrackLogoLight')
        self.setWindowIcon(ftrack_icon)

        layout = QtWidgets.QVBoxLayout()
        self.setLayout(layout)

        box = QtWidgets.QGroupBox(
            'An error occured in the current schema configuration.')

        self.layout().addWidget(box)

        box_layout = QtWidgets.QVBoxLayout()
        box.setLayout(box_layout)

        form_layout = TaskUIFormLayout()
        box_layout.addLayout(form_layout)
        if duplicated_components:

            form_layout.addDivider(
                '{} Duplicated components name have been found'.format(
                    len(duplicated_components)))

            for component_name, task in duplicated_components:

                ui_property = UIPropertyFactory.create(
                    type(component_name),
                    key='component_name',
                    value=component_name,
                    dictionary=task._preset.properties()['ftrack'],
                    label='Component ' + ':',
                    tooltip='Duplicated component name')
                ui_property.update(True)
                form_layout.addRow('Duplicated component' + ':', ui_property)

                if component_name != task.component_name():
                    component_index = duplicated_components.index(
                        (task.component_name(), task))
                    duplicated_components.pop(component_index)

        for processor, values in error_data.items():
            form_layout.addDivider('Wrong {0} presets'.format(
                processor.__class__.__name__))

            for attribute, valid_values in values.items():
                valid_values.insert(0, '- select a value -')
                key, value, label = attribute, valid_values, ' '.join(
                    attribute.split('_'))
                tooltip = 'Set {0} value'.format(attribute)

                ui_property = UIPropertyFactory.create(
                    type(value),
                    key=key,
                    value=value,
                    dictionary=processor._preset.properties()['ftrack'],
                    label=label + ':',
                    tooltip=tooltip)
                form_layout.addRow(label + ':', ui_property)
                ui_property.update(True)

        if missing_assets_types:
            form_layout.addDivider('Missing asset types')

            for missing_asset in missing_assets_types:
                create_asset_button = QtWidgets.QPushButton(
                    missing_asset.capitalize())
                create_asset_button.clicked.connect(self.create_missing_asset)
                form_layout.addRow('Create asset: ', create_asset_button)

        buttons = QtWidgets.QDialogButtonBox()
        buttons.setOrientation(QtCore.Qt.Horizontal)
        buttons.addButton('Cancel', QtWidgets.QDialogButtonBox.RejectRole)
        buttons.addButton('Accept', QtWidgets.QDialogButtonBox.AcceptRole)
        buttons.accepted.connect(self.accept)
        buttons.rejected.connect(self.reject)
        self.layout().addWidget(buttons)
Exemplo n.º 6
0
  def populateUI(self, widget, exportTemplate):
    layout = widget.layout()
    formLayout = TaskUIFormLayout()
    layout.addLayout(formLayout)

    # Thumb frame type layout
    thumbFrameLayout = PySide.QtGui.QHBoxLayout()
    self._frameTypeComboBox = PySide.QtGui.QComboBox()    
    self._frameTypeComboBox.setToolTip("Specify the frame from which to pick the thumbnail.\nCustom allows you to specify a custom frame offset, relative from the first frame.")

    thumbFrameTypes = (self.kFirstFrame, self.kMiddleFrame, self.kLastFrame, self.kCustomFrame)
    for index, item in zip(range(0,len(thumbFrameTypes)), thumbFrameTypes):
      self._frameTypeComboBox.addItem(item)
      if item == str(self._preset.properties()["frameType"]):
        self._frameTypeComboBox.setCurrentIndex(index)

    self._frameTypeComboBox.setMaximumWidth(80)

    self._customFrameLineEdit = PySide.QtGui.QLineEdit()
    self._customFrameLineEdit.setEnabled(False)
    self._customFrameLineEdit.setToolTip("This is the frame offset from the first frame of the shot/sequence")
    self._customFrameLineEdit.setValidator(PySide.QtGui.QIntValidator())
    self._customFrameLineEdit.setMaximumWidth(80);
    self._customFrameLineEdit.setText(str(self._preset.properties()["customFrameOffset"]))

    thumbFrameLayout.addWidget(self._frameTypeComboBox, PySide.QtCore.Qt.AlignLeft)
    thumbFrameLayout.addWidget(self._customFrameLineEdit, PySide.QtCore.Qt.AlignLeft)
    #thumbFrameLayout.addStretch()

    # QImage save format type
    self._formatComboBox = PySide.QtGui.QComboBox()
    thumbFrameTypes = ("png", "jpg", "tiff", "bmp")
    for index, item in zip(range(0,len(thumbFrameTypes)), thumbFrameTypes):
      self._formatComboBox.addItem(item)
      if item == str(self._preset.properties()["format"]):
        self._formatComboBox.setCurrentIndex(index)

    self._formatComboBox.currentIndexChanged.connect(self.formatComboBoxChanged)
    

    # QImage save height
    # Thumb frame type layout
    thumbSizeLayout = PySide.QtGui.QHBoxLayout()

    self._thumbSizeComboBox = PySide.QtGui.QComboBox()
    self._thumbSizeComboBox.setMaximumWidth(115)
    self._thumbSizeComboBox.setToolTip("This determines the size of the thumbnail.\nLeave as Default to use Hiero's internal thumbnail size or specify a box or width/height scaling in pixels.")
    thumbSizeTypes = ("Default","To Box", "Scaled to Width", "Scaled to Height")
    for index, item in zip(range(0,len(thumbSizeTypes)), thumbSizeTypes):
      self._thumbSizeComboBox.addItem(item)
      if item == str(self._preset.properties()["thumbSize"]):
        self._thumbSizeComboBox.setCurrentIndex(index)

    thumbSizeLayout.addWidget(self._thumbSizeComboBox)
    self._wLabel = PySide.QtGui.QLabel('w:')
    self._wLabel.setFixedWidth(12)    
    thumbSizeLayout.addWidget(self._wLabel,PySide.QtCore.Qt.AlignLeft)
    self._widthBox = PySide.QtGui.QLineEdit()
    self._widthBox.setToolTip("Thumbnail width in pixels")
    self._widthBox.setEnabled(False)
    self._widthBox.setValidator(PySide.QtGui.QIntValidator())
    self._widthBox.setMaximumWidth(40)
    self._widthBox.setText(str(self._preset.properties()["width"]))  
    self._widthBox.textChanged.connect(self.widthTextChanged)  
    thumbSizeLayout.addWidget(self._widthBox,PySide.QtCore.Qt.AlignLeft)

    self._hLabel = PySide.QtGui.QLabel('h:')
    self._hLabel.setFixedWidth(12)
    thumbSizeLayout.addWidget(self._hLabel,PySide.QtCore.Qt.AlignLeft)
    self._heightBox = PySide.QtGui.QLineEdit()
    self._heightBox.setToolTip("Thumbnail height in pixels")
    self._heightBox.setEnabled(False)
    self._heightBox.setValidator(PySide.QtGui.QIntValidator())
    self._heightBox.setMaximumWidth(40)
    self._heightBox.setText(str(self._preset.properties()["height"]))
    self._heightBox.textChanged.connect(self.heightTextChanged)    
    thumbSizeLayout.addWidget(self._heightBox,PySide.QtCore.Qt.AlignLeft)

    self._thumbSizeComboBox.currentIndexChanged.connect(self.thumbSizeComboBoxChanged)
    self.thumbSizeComboBoxChanged(0)
    self._frameTypeComboBox.currentIndexChanged.connect(self.frameTypeComboBoxChanged)
    self.frameTypeComboBoxChanged(0) # Trigger to make it set the enabled state correctly
    self._customFrameLineEdit.textChanged.connect(self.customOffsetTextChanged)
    
    formLayout.addRow("Frame Type:",thumbFrameLayout)
    formLayout.addRow("Size:",thumbSizeLayout)
    formLayout.addRow("File Type:",self._formatComboBox)