def _updateIcon(self):
     if self.publish:
         if self.is_latest:
             self.setIcon(0, ui_utils.icon('silk/tick', size=12, as_icon=True))
         else:
             self.setIcon(0, ui_utils.icon('silk/cross', size=12, as_icon=True))
     else:
         self.setIcon(0, ui_utils.icon('silk/error', size=12, as_icon=True))
Beispiel #2
0
 def _updateIcon(self):
     if self.publish:
         if self.is_latest:
             self.setIcon(0, ui_utils.icon('silk/tick', size=12, as_icon=True))
         else:
             self.setIcon(0, ui_utils.icon('silk/cross', size=12, as_icon=True))
     else:
         self.setIcon(0, ui_utils.icon('silk/error', size=12, as_icon=True))
Beispiel #3
0
 def _setup_ui(self):
     
     super(Widget, self)._setup_ui()
     
     self._playblast = QtGui.QPushButton(ui_utils.icon('silk/pictures', size=12, as_icon=True), "Playblast")
     self._playblast.clicked.connect(self._on_playblast)
     self._movie_layout.addWidget(self._playblast)
     self._playblast.setFixedHeight(self._movie_path.sizeHint().height())
     self._playblast.setFixedWidth(self._playblast.sizeHint().width() + 2)
     
     self._viewer_msgbox = None
     self.viewerClosed.connect(self._on_viewer_closed)
Beispiel #4
0
    def _setup_ui(self):

        super(Widget, self)._setup_ui()

        self._playblast = QtGui.QPushButton(
            ui_utils.icon('silk/pictures', size=12, as_icon=True), "Playblast")
        self._playblast.clicked.connect(self._on_playblast)
        self._movie_layout.addWidget(self._playblast)
        self._playblast.setFixedHeight(self._movie_path.sizeHint().height())
        self._playblast.setFixedWidth(self._playblast.sizeHint().width() + 2)

        self._viewer_msgbox = None
        self.viewerClosed.connect(self._on_viewer_closed)
Beispiel #5
0
def run(entity_type, selected_ids, **kwargs):
    
    app = QtGui.QApplication([])
    QtGui.QApplication.setWindowIcon(ui_utils.icon('fatcow/brick_go', as_icon=True))
        
    sgfs = SGFS()
    publish = sgfs.session.merge({'type': entity_type, 'id': selected_ids[0]})
    task, type_, _, _ = publish.fetch(('sg_link', 'sg_type', 'sg_path', 'sg_version'), force=True)
    if type_ != 'maya_scene':
        QtGui.QMessageBox.critical(None, 'Unknown Publish Type', 'Cannot process publishes of type %r.' % type_)
        exit(1)
    
    task['step'].fetch_core() # For the picker.
    
    dialog = Dialog(publish)
    dialog.show()
    dialog.raise_()
    exit(app.exec_())
def run(entity_type, selected_ids, **kwargs):
    
    app = QtGui.QApplication([])
    QtGui.QApplication.setWindowIcon(ui_utils.icon('fatcow/brick_go', as_icon=True))
        
    sgfs = SGFS()
    publish = sgfs.session.merge({'type': entity_type, 'id': selected_ids[0]})
    task, type_, _, _ = publish.fetch(('sg_link', 'sg_type', 'sg_path', 'sg_version'), force=True)
    if type_ != 'maya_scene':
        QtGui.QMessageBox.critical(None, 'Unknown Publish Type', 'Cannot process publishes of type %r.' % type_)
        exit(1)
    
    task['step'].fetch_core() # For the picker.
    
    dialog = Dialog(publish)
    dialog.show()
    dialog.raise_()
    exit(app.exec_())
Beispiel #7
0
 def _setup_ui(self):
     
     self.setLayout(QtGui.QVBoxLayout())
     
     self._task_combo = ComboBox()
     self._task_combo.addItem('Loading...', {'loading': True})
     self._task_combo.currentIndexChanged.connect(self._task_changed)
     
     self._name_combo = ComboBox()
     self._name_combo.addItem('Loading...', {'loading': True})
     self._name_combo.addItem('Create new stream...', {'new': True})
     self._name_combo.currentIndexChanged.connect(self._name_changed)
     
     self._tasksLabel = QtGui.QLabel("Task")
     self.layout().addLayout(hbox(
         vbox(self._tasksLabel, self._task_combo),
         vbox("Publish Stream", self._name_combo),
         spacing=4
     ))
     
     self._name_field = QtGui.QLineEdit(self._basename)
     self._name_field.setEnabled(False)
     self._name_field.editingFinished.connect(self._on_name_edited)
     
     self._version_spinbox = QtGui.QSpinBox()
     self._version_spinbox.setMinimum(1)
     self._version_spinbox.setMaximum(9999)
     self._version_spinbox.valueChanged.connect(self._on_version_changed)
     self._version_warning_issued = False
     
     self.layout().addLayout(hbox(
         vbox("Name", self._name_field),
         vbox("Version", self._version_spinbox),
         spacing=4
     ))
     
     # Get publish data in the background.
     self.loaded_publishes.connect(self._populate_existing_data)
     self._thread = QtCore.QThread()
     self._thread.run = self._fetch_existing_data
     self._thread.start()
     
     self._description = QtGui.QTextEdit('')
     self._description.setMaximumHeight(100)
     
     self._thumbnail_path = None
     self._thumbnail_canvas = QtGui.QLabel()
     self._thumbnail_canvas.setFrameShadow(QtGui.QFrame.Sunken)
     self._thumbnail_canvas.setFrameShape(QtGui.QFrame.Panel)
     self._thumbnail_canvas.setToolTip("Click to specify part of screen.")
     self._thumbnail_canvas.mouseReleaseEvent = self.take_partial_screenshot
     
     self.layout().addLayout(hbox(
         vbox("Describe Your Changes", self._description),
         vbox("Thumbnail", self._thumbnail_canvas),
     ))
     
     self._movie_path = QtGui.QLineEdit()
     self._movie_browse = QtGui.QPushButton(icon('silk/folder', size=12, as_icon=True), "Browse")
     self._movie_browse.clicked.connect(self._on_movie_browse)
     self._movie_layout = hbox(self._movie_path, self._movie_browse)
     self.layout().addLayout(vbox("Path to Movie or Frames (to be copied to publish)", self._movie_layout, spacing=4))
     self._movie_browse.setFixedHeight(self._movie_path.sizeHint().height())
     self._movie_browse.setFixedWidth(self._movie_browse.sizeHint().width() + 2)
     
     self._promote_checkbox = QtGui.QCheckBox("Promote to 'Version' for review")
     # self.layout().addWidget(self._promote_checkbox)
     
     self._timelog_spinbox = TimeSpinner()
     add_hour = QtGui.QPushButton("+1 Hour")
     add_hour.setFixedHeight(self._timelog_spinbox.sizeHint().height())
     @add_hour.clicked.connect
     def on_add_hour():
         self._timelog_spinbox.setValue(self._timelog_spinbox.value() + 60)
     add_day = QtGui.QPushButton("+1 Day")
     add_day.setFixedHeight(self._timelog_spinbox.sizeHint().height())
     @add_day.clicked.connect
     def on_add_day():
         self._timelog_spinbox.setValue(self._timelog_spinbox.value() + 60 * 8)
     
     self.layout().addLayout(hbox(
         vbox("Time to Log", hbox(self._timelog_spinbox, "hrs:mins", add_hour, add_day)),
         vbox("Review", self._promote_checkbox),
     ))
Beispiel #8
0
 def _setup_ui(self):
     
     self.setLayout(QtGui.QVBoxLayout())
     
     self._task_combo = ComboBox()
     self._task_combo.addItem('Loading...', {'loading': True})
     self._task_combo.currentIndexChanged.connect(self._task_changed)
     
     self._name_combo = ComboBox()
     self._name_combo.addItem('Loading...', {'loading': True})
     self._name_combo.addItem('Create new stream...', {'new': True})
     self._name_combo.currentIndexChanged.connect(self._name_changed)
     
     self._tasksLabel = QtGui.QLabel("Task")
     self.layout().addLayout(hbox(
         vbox(self._tasksLabel, self._task_combo),
         vbox("Publish Stream", self._name_combo),
         spacing=4
     ))
     
     self._name_field = QtGui.QLineEdit(self._basename)
     self._name_field.setEnabled(False)
     self._name_field.editingFinished.connect(self._on_name_edited)
     
     self._version_spinbox = QtGui.QSpinBox()
     self._version_spinbox.setMinimum(1)
     self._version_spinbox.setMaximum(9999)
     self._version_spinbox.valueChanged.connect(self._on_version_changed)
     self._version_warning_issued = False
     
     self.layout().addLayout(hbox(
         vbox("Name", self._name_field),
         vbox("Version", self._version_spinbox),
         spacing=4
     ))
     
     # Get publish data in the background.
     self.loaded_publishes.connect(self._populate_existing_data)
     self._thread = QtCore.QThread()
     self._thread.run = self._fetch_existing_data
     self._thread.start()
     
     self._description = QtGui.QTextEdit('')
     self._description.setMaximumHeight(100)
     
     self._thumbnail_path = None
     self._thumbnail_canvas = QtGui.QLabel()
     self._thumbnail_canvas.setFrameShadow(QtGui.QFrame.Sunken)
     self._thumbnail_canvas.setFrameShape(QtGui.QFrame.Panel)
     self._thumbnail_canvas.setToolTip("Click to specify part of screen.")
     self._thumbnail_canvas.mouseReleaseEvent = self.take_partial_screenshot
     
     self.layout().addLayout(hbox(
         vbox("Describe Your Changes", self._description),
         vbox("Thumbnail", self._thumbnail_canvas),
     ))
     
     self._movie_path = QtGui.QLineEdit()
     self._movie_browse = QtGui.QPushButton(icon('silk/folder', size=12, as_icon=True), "Browse")
     self._movie_browse.clicked.connect(self._on_movie_browse)
     self._movie_layout = hbox(self._movie_path, self._movie_browse)
     self.layout().addLayout(vbox("Path to Movie or Frames (to be copied to publish)", self._movie_layout, spacing=4))
     self._movie_browse.setFixedHeight(self._movie_path.sizeHint().height())
     self._movie_browse.setFixedWidth(self._movie_browse.sizeHint().width() + 2)
     
     self._promote_checkbox = QtGui.QCheckBox("Promote to 'Version' for review")
     # self.layout().addWidget(self._promote_checkbox)
     
     self._timelog_spinbox = TimeSpinner()
     add_hour = QtGui.QPushButton("+1 Hour")
     add_hour.setFixedHeight(self._timelog_spinbox.sizeHint().height())
     @add_hour.clicked.connect
     def on_add_hour():
         self._timelog_spinbox.setValue(self._timelog_spinbox.value() + 60)
     add_day = QtGui.QPushButton("+1 Day")
     add_day.setFixedHeight(self._timelog_spinbox.sizeHint().height())
     @add_day.clicked.connect
     def on_add_day():
         self._timelog_spinbox.setValue(self._timelog_spinbox.value() + 60 * 8)
     
     self.layout().addLayout(hbox(
         vbox("Time to Log", hbox(self._timelog_spinbox, "hrs:mins", add_hour, add_day)),
         vbox("Review", self._promote_checkbox),
     ))