def _buildShotsTab(self): l = FnAssetAPI.l # > Shots Tab shotsWidget = QtGui.QWidget() shotsWidget.setSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) shotsWidgetLayout = QtGui.QVBoxLayout() shotsWidgetLayout.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop) shotsWidget.setLayout(shotsWidgetLayout) self._tickIcon = QtGui.QIcon("icons:TagGood.png") self._actionIcon = QtGui.QIcon("icons:Add.png") self._shotsList = AdvancedHieroItemSpreadsheet() self._shotsList.setAlternatingRowColors(True) self._shotsList.setIcons(self._actionIcon, self._tickIcon) self._shotsList.setHiddenProperties(("nameHint",)) self._shotsList.setForcedProperties( ("startFrame", "endFrame", "inFrame", "outFrame")) self._shotsList.setStatusText(l("New {shot}"), l("Existing {shot}")) self._shotsList.setDisabledCallback(self.__shotItemIsDisabled) shotsWidgetLayout.addWidget(self._shotsList) # See if we have any options from the manager shotSpec = ShotSpecification() self._managerOptionsShot = self._session.getManagerWidget( FnAssetAPI.ui.constants.kRegistrationManagerOptionsWidgetId, throw=False, args=(shotSpec, self._context)) if self._managerOptionsShot: shotsWidgetLayout.addWidget(self._managerOptionsShot) shotsWidgetLayout.addSpacing(10) # Length Options self._shotLengthGBox = QtGui.QGroupBox("Set Shot Timings from Hiero") self._shotLengthGBox.setCheckable(True) self._shotLengthGBox.setChecked(False) slGbLayout = QtGui.QHBoxLayout() self._shotLengthGBox.setLayout(slGbLayout) self._shotLengthOptionsWidget = TrackItemTimingOptionsWidget() slGbLayout.addWidget(self._shotLengthOptionsWidget) slGbLayout.addStretch() shotsWidgetLayout.addWidget(self._shotLengthGBox) return shotsWidget
def _buildShotsTab(self): l = FnAssetAPI.l # > Shots Tab shotsWidget = QtGui.QWidget() shotsWidget.setSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) shotsWidgetLayout = QtGui.QVBoxLayout() shotsWidgetLayout.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop) shotsWidget.setLayout(shotsWidgetLayout) # - Conflicting Shots self._shotsList = AdvancedHieroItemSpreadsheet() self._shotsList.setAlternatingRowColors(True) self._shotsList.setHiddenProperties(("nameHint",)) self._shotsList.setForcedProperties( ("startFrame", "endFrame", "inFrame", "outFrame", "inTimecode", "sourceTimecode")) self._shotsList.setStatusText(l("Update Timings"), l("Timings Match")) self._shotsList.setDisabledCallback(self.__shotItemIsDisabled) self._shotsList.setStatusCallback(self.__statusForShotItem) self._shotsList.setIconCallback(self.__iconForShotItem) shotsWidgetLayout.addWidget(self._shotsList) # Length Options self._shotLengthGBox = QtGui.QGroupBox("Set Shot Timings") self._shotLengthGBox.setCheckable(True) self._shotLengthGBox.setChecked(False) slGbLayout = QtGui.QHBoxLayout() self._shotLengthGBox.setLayout(slGbLayout) self._shotLengthOptionsWidget = TrackItemTimingOptionsWidget() slGbLayout.addWidget(self._shotLengthOptionsWidget) slGbLayout.addStretch() shotsWidgetLayout.addWidget(self._shotLengthGBox) return shotsWidget
def _buildClipsTab(self): l = FnAssetAPI.l imageSpecification = ImageSpecification() # > Media Ta mediaWidget = QtGui.QWidget() mediaWidget.setSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) mediaWidgetLayout = QtGui.QVBoxLayout() mediaWidgetLayout.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop) mediaWidget.setLayout(mediaWidgetLayout) # - Shared Media self._sharedClipsGroup = QtGui.QGroupBox( l("Some Source Clips are Shared " + "and used in more than one Shot in the Edit")) mediaWidgetLayout.addWidget(self._sharedClipsGroup) sharedClipsGroupLayout = QtGui.QVBoxLayout() self._sharedClipsGroup.setLayout(sharedClipsGroupLayout) self._sharedIgnoredRadio = QtGui.QRadioButton(l("Don't {publish}")) self._sharedToSequenceRadio = QtGui.QRadioButton( l("{publish} at the level above the Shots")) self._sharedToCustomRadio = QtGui.QRadioButton( l("{publish} to another location")) self._sharedIgnoredRadio.setChecked(True) sharedClipsGroupLayout.addWidget(self._sharedIgnoredRadio) sharedClipsGroupLayout.addWidget(self._sharedToSequenceRadio) sharedClipsGroupLayout.addWidget(self._sharedToCustomRadio) ## @todo Use the project entityReferences Parent if we have one? pickerCls = self._session.getManagerWidget( FnAssetAPI.ui.constants.kInlinePickerWidgetId, instantiate=False) self._sharedClipParentPicker = pickerCls(imageSpecification, self._context) self._sharedClipParentPicker.setVisible(False) sharedClipsGroupLayout.addWidget(self._sharedClipParentPicker) self._previewWidget = PublishShotClipsSummaryWidget() self._previewWidget.setSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) mediaWidgetLayout.addWidget(self._previewWidget) # - Options self._clipOptionsGroup = QtGui.QGroupBox(l("Options")) optionsGroupLayout = QtGui.QVBoxLayout() self._clipOptionsGroup.setLayout(optionsGroupLayout) mediaWidgetLayout.addWidget(self._clipOptionsGroup) # See if we have any options from the manager self._managerOptionsClip = self._session.getManagerWidget( FnAssetAPI.ui.constants.kRegistrationManagerOptionsWidgetId, throw=False, args=(imageSpecification, self._context)) if self._managerOptionsClip: optionsGroupLayout.addWidget(self._managerOptionsClip) optionsGroupLayout.addSpacing(10) hieroOptionsGrid = QtGui.QGridLayout() ## @todo we should have some base widget for this hieroOptionsGrid.addWidget(QtGui.QLabel(l("{asset} name:")), 0, 0) self._clipNameCombo = QtGui.QComboBox() self._clipNameCombo.addItems(("Clip Name", "Custom")) hieroOptionsGrid.addWidget(self._clipNameCombo, 0, 1) self._clipNameCustomField = QtGui.QLineEdit() hieroOptionsGrid.addWidget(self._clipNameCustomField, 0, 2) self._replaceClipSource = QtGui.QCheckBox( l("Link Source Clips to " + "{published} {assets}")) hieroOptionsGrid.addWidget(self._replaceClipSource, 1, 1, 1, 2) self._ignorePublishedClips = QtGui.QCheckBox( l("Ignore Source Clips that are " + "already {published}")) hieroOptionsGrid.addWidget(self._ignorePublishedClips, 2, 1, 1, 2) # Make sure we don't stretch the grid layout too much and make the last #column really wide hieroOptionsHBox = QtGui.QHBoxLayout() optionsGroupLayout.addLayout(hieroOptionsHBox) hieroOptionsHBox.addLayout(hieroOptionsGrid) hieroOptionsHBox.addStretch() return mediaWidget