def __init__(self, *args, **kwargs): """ :type args: list :type kwargs: dict """ mayabaseplugin.CreateWidget.__init__(self, *args, **kwargs) self._sequencePath = None start, end = mutils.currentFrameRange() self.ui.sequenceWidget = studioqt.ImageSequenceWidget(self) icon = studiolibraryplugins.resource().icon("thumbnail") self.ui.sequenceWidget.setIcon(icon) self.ui.layout().insertWidget(1, self.ui.sequenceWidget) self.ui.snapshotButton.parent().hide() self.ui.sequenceWidget.setStyleSheet( self.ui.snapshotButton.styleSheet()) validator = QtGui.QIntValidator(-50000000, 50000000, self) self.ui.endFrameEdit.setValidator(validator) self.ui.startFrameEdit.setValidator(validator) self.ui.endFrameEdit.setText(str(int(end))) self.ui.startFrameEdit.setText(str(int(start))) self.ui.byFrameEdit.setValidator(QtGui.QIntValidator(1, 1000, self)) self.ui.byFrameEdit.setText(str(self.settings().get("byFrame"))) self.ui.sequenceWidget.clicked.connect(self.snapshot) self.ui.setEndFrameButton.clicked.connect(self.setEndFrame) self.ui.setStartFrameButton.clicked.connect(self.setStartFrame)
class AnimCreateWidget(transferitem.CreateWidget): def __init__(self, item=None, parent=None): """ :type args: list :type kwargs: dict """ item = item or AnimItem() transferitem.CreateWidget.__init__(self, item, parent=parent) self._sequencePath = None try: start, end = (1, 100) start, end = mutils.currentFrameRange() except NameError, e: logger.exception(e) self.ui.sequenceWidget = studioqt.ImageSequenceWidget(self) self.ui.sequenceWidget.setStyleSheet( self.ui.thumbnailButton.styleSheet()) self.ui.sequenceWidget.setToolTip(self.ui.thumbnailButton.toolTip()) icon = studiolibraryitems.resource().icon("thumbnail2") self.ui.sequenceWidget.setIcon(icon) self.ui.thumbnailFrame.layout().insertWidget(0, self.ui.sequenceWidget) self.ui.thumbnailButton.hide() self.ui.thumbnailButton = self.ui.sequenceWidget validator = QtGui.QIntValidator(-50000000, 50000000, self) self.ui.endFrameEdit.setValidator(validator) self.ui.startFrameEdit.setValidator(validator) self.ui.endFrameEdit.setText(str(int(end))) self.ui.startFrameEdit.setText(str(int(start))) self.ui.byFrameEdit.setValidator(QtGui.QIntValidator(1, 1000, self)) self.ui.sequenceWidget.clicked.connect(self.thumbnailCapture) self.ui.frameRangeButton.clicked.connect(self.showFrameRangeMenu) settings = animSettings() byFrame = settings.get("byFrame") self.setByFrame(byFrame) fileType = settings.get("fileType") self.setFileType(fileType) self.ui.byFrameEdit.textChanged.connect(self.stateChanged) self.ui.fileTypeComboBox.currentIndexChanged.connect(self.stateChanged)
def createSequenceWidget(self): """ Create a sequence widget to replace the static thumbnail widget. :rtype: None """ self.ui.sequenceWidget = studioqt.ImageSequenceWidget(self) self.ui.sequenceWidget.setStyleSheet( self.ui.thumbnailButton.styleSheet()) self.ui.sequenceWidget.setToolTip(self.ui.thumbnailButton.toolTip()) self.ui.sequenceWidget.setDirname(self.item().imageSequencePath()) self.ui.thumbnailFrame.layout().insertWidget(0, self.ui.sequenceWidget) self.ui.thumbnailButton.hide() self.ui.thumbnailButton = self.ui.sequenceWidget
def createSequenceWidget(self): """ Create a sequence widget to replace the static thumbnail widget. :rtype: None """ self.ui.sequenceWidget = studioqt.ImageSequenceWidget(self) self.ui.sequenceWidget.setStyleSheet( self.ui.thumbnailButton.styleSheet()) self.ui.sequenceWidget.setToolTip(self.ui.thumbnailButton.toolTip()) icon = studiolibrarymaya.resource().icon("thumbnail2") self.ui.sequenceWidget.setIcon(icon) self.ui.thumbnailFrame.layout().insertWidget(0, self.ui.sequenceWidget) self.ui.thumbnailButton.hide() self.ui.thumbnailButton = self.ui.sequenceWidget self.ui.sequenceWidget.clicked.connect(self.thumbnailCapture)