mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 21:32:15 +01:00
Fix delivery - fixes #351
This commit is contained in:
parent
8f143e446d
commit
c193e2e614
1 changed files with 18 additions and 9 deletions
|
|
@ -91,9 +91,15 @@ class DeliveryOptionsDialog(QtWidgets.QDialog):
|
|||
longest_key = max(self.templates.keys(), key=len)
|
||||
dropdown.setMinimumContentsLength(len(longest_key))
|
||||
|
||||
template_label = QtWidgets.QLabel()
|
||||
template_label.setCursor(QtGui.QCursor(QtCore.Qt.IBeamCursor))
|
||||
template_label.setTextInteractionFlags(QtCore.Qt.TextSelectableByMouse)
|
||||
template_dir_label = QtWidgets.QLabel()
|
||||
template_dir_label.setCursor(QtGui.QCursor(QtCore.Qt.IBeamCursor))
|
||||
template_dir_label.setTextInteractionFlags(
|
||||
QtCore.Qt.TextSelectableByMouse)
|
||||
|
||||
template_file_label = QtWidgets.QLabel()
|
||||
template_file_label.setCursor(QtGui.QCursor(QtCore.Qt.IBeamCursor))
|
||||
template_file_label.setTextInteractionFlags(
|
||||
QtCore.Qt.TextSelectableByMouse)
|
||||
|
||||
renumber_frame = QtWidgets.QCheckBox()
|
||||
|
||||
|
|
@ -123,7 +129,8 @@ class DeliveryOptionsDialog(QtWidgets.QDialog):
|
|||
|
||||
input_layout.addRow("Selected representations", selected_label)
|
||||
input_layout.addRow("Delivery template", dropdown)
|
||||
input_layout.addRow("Template value", template_label)
|
||||
input_layout.addRow("Template directory", template_dir_label)
|
||||
input_layout.addRow("Template file", template_file_label)
|
||||
input_layout.addRow("Renumber Frame", renumber_frame)
|
||||
input_layout.addRow("Renumber start frame", first_frame_start)
|
||||
input_layout.addRow("Root", root_line_edit)
|
||||
|
|
@ -151,7 +158,8 @@ class DeliveryOptionsDialog(QtWidgets.QDialog):
|
|||
layout.addWidget(text_area)
|
||||
|
||||
self.selected_label = selected_label
|
||||
self.template_label = template_label
|
||||
self.template_dir_label = template_dir_label
|
||||
self.template_file_label = template_file_label
|
||||
self.dropdown = dropdown
|
||||
self.first_frame_start = first_frame_start
|
||||
self.renumber_frame = renumber_frame
|
||||
|
|
@ -282,10 +290,10 @@ class DeliveryOptionsDialog(QtWidgets.QDialog):
|
|||
"""Adds list of delivery templates from Anatomy to dropdown."""
|
||||
templates = {}
|
||||
for template_name, value in anatomy.templates["delivery"].items():
|
||||
path_template = value["path"]
|
||||
directory_template = value["directory"]
|
||||
if (
|
||||
not isinstance(path_template, str)
|
||||
or not path_template.startswith('{root')
|
||||
not isinstance(directory_template, str)
|
||||
or not directory_template.startswith('{root')
|
||||
):
|
||||
continue
|
||||
|
||||
|
|
@ -350,7 +358,8 @@ class DeliveryOptionsDialog(QtWidgets.QDialog):
|
|||
name = self.dropdown.currentText()
|
||||
template_value = self.templates.get(name)
|
||||
if template_value:
|
||||
self.template_label.setText(template_value)
|
||||
self.template_dir_label.setText(template_value["directory"])
|
||||
self.template_file_label.setText(template_value["file"])
|
||||
self.btn_delivery.setEnabled(bool(self._get_selected_repres()))
|
||||
|
||||
def _update_progress(self, uploaded):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue