Пример #1
0
	def fillProjects(self):
		"""docstring for fillProjects"""
		projects = prj.projects( self.settings.General[ "serverpath" ] )
		self.projects_cmb.addItems( projects )
		index = self.projects_cmb.findText( self.projectName )
		if not index == -1:
			self.projects_cmb.setCurrentIndex(index)
Пример #2
0
def fillProjects( node ):
	"""docstring for fillProjects"""
	settings = sti.Settings()
	gen = settings.General
	if gen:
		basePath = gen[ "basepath" ]
		if basePath:
			if basePath.endswith( '\\' ):
				basePath = basePath[:-1]
			prj.BASE_PATH = basePath.replace( '\\', '/' )
		renderPath = gen[ "renderpath" ]
		node[ 'projectSel' ].setValues( prj.projects( prj.BASE_PATH ) )
	root = nuke.root()
	if root.knob('pipPorject'):
		pipPorj = root[ 'pipPorject' ].value()
		pipSeq  = root[ 'pipSequence' ].value()
		pipShot = root[ 'pipShot' ].value()
		node[ 'projectSel' ].setValue( pipPorj )
		node[ 'seqSel' ].setValues( [s.name for s in prj.Project( pipPorj ).sequences] )
		node[ 'seqSel' ].setValue( pipSeq )
		node[ 'shotSel' ].setValues( [ s.name for s in sq.Sequence( pipSeq, prj.Project( pipPorj )).shots ]  )
		node[ 'shotSel' ].setValue( pipShot )
		node[ 'layerSel' ].setValues( sh.Shot( pipShot, sq.Sequence( pipSeq, prj.Project( pipPorj ))).renderedLayers( renderPath ) )
		node[ '_version' ].setValues( sh.Shot( pipShot, sq.Sequence( pipSeq, prj.Project( pipPorj ))).renderedLayerVersions( renderPath, node[ 'layerSel' ].value() ) )
		vers = sorted( node[ '_version' ].values() )
		node[ '_version' ].setValue( vers[-1] )
	else:
		f = nuke.getClipname("Select clip")
		node['file'].fromUserText(f)
Пример #3
0
	def fillProjectsCombo(self):
		"""fill projects combo with projects in local disc"""
		lastProj = str(self.projects_cmb.currentText())
		self.projects_cmb.clear()
		localProjects = prj.projects( prj.BASE_PATH )
		projects = []
		if self.compareServer_chb.isChecked(): #SERVER MODE ON
			serverProjects = prj.projects( self.serverPath )
			for s in serverProjects:
				if any( l == s for l in localProjects ):
					continue
				projects.append( s )
		projects.extend( localProjects )
		self.projects_cmb.addItems( ['All'] + projects )
		index = self.projects_cmb.findText( lastProj )
		if not index == -1:
			self.projects_cmb.setCurrentIndex(index)
Пример #4
0
	def fillProjects(self):
		"""docstring for fillProjects"""
		projects = prj.projects( prj.BASE_PATH )
		self.projects_cmb.addItems( projects )
		root = nuke.root()
		if root.knob( 'pipPorject' ):
			index = self.projects_cmb.findText( root[ 'pipPorject' ].value() )
			if not index == -1:
				self.projects_cmb.setCurrentIndex(index)
Пример #5
0
	def fillProjectsCombo(self):
		"""fill projects combo with projects in local disc"""
		self.projects_cmb.clear()
		projects = prj.projects( prj.BASE_PATH )
		self.projects_cmb.addItems( projects )
Пример #6
0
	def fillProjectsCMB(self):
		"""fill combo box with projects"""
		self.projects_cmb.clear()
		self.projects_cmb.addItems( prj.projects( prj.BASE_PATH ) )
Пример #7
0
	def fillTasks(self):
		"""fill tasks for project and user"""
		self.tasks_tw.clearContents()
		self.tasks_tw.setSortingEnabled(False)
		data = {}
		if self.project == 'All':
			for p in prj.projects( self.settings.General[ 'serverpath' ] ):
				dataBase = db.ProjectDataBase( p )
				if dataBase.exists:
					data[ p ] = []
					for u in dataBase.getUsers():
						data[ p ].extend(dataBase.getAssetsForUser( u ))
		else:
			dataBase = db.ProjectDataBase( self.project )
			data[self.project] = []
			for u in dataBase.getUsers():
				data[self.project].extend(dataBase.getAssetsForUser( u ))
		dataLen = 0
		for d in data.keys():
			dataLen += len( data[d] )
		self.tasks_tw.setRowCount( dataLen )
		self.mapper = QtCore.QSignalMapper(self)
		i = 0
		for d in data.keys():
			dataBase = db.ProjectDataBase( d )
			for a in data[d]:
				#NAME
				tmpA = a
				item = QtGui.QTableWidgetItem( a.fullname )
				item.setData(32, a )
				self.tasks_tw.setItem( i, 0, item )
				#USER
				cmbStatus = QtGui.QComboBox()
				cmbStatus.addItems( dataBase.getUsers() )
				index = cmbStatus.findText( a.user )
				if not index == -1:
					cmbStatus.setCurrentIndex(index)
				item = QtGui.QTableWidgetItem( a.user )
				self.tasks_tw.setItem( i, 1, item )
				self.tasks_tw.setCellWidget(i,1, cmbStatus);
				self.connect( cmbStatus, QtCore.SIGNAL("currentIndexChanged( const int& )" ), self.mapper, QtCore.SLOT("map()") )
				self.mapper.setMapping(cmbStatus, a.fullname)
				#PROJECT
				item = QtGui.QTableWidgetItem( d )
				item.setData(32, a )
				self.tasks_tw.setItem( i, 2, item )
				#PRIORITY
				spin = QtGui.QSpinBox()
				spin.setValue( a.priority )
				spin.setRange( 0, 100 )
				item = QtGui.QTableWidgetItem( str( a.priority ) )
				self.tasks_tw.setItem( i, 3, item )
				self.tasks_tw.setCellWidget(i,3, spin);
				self.connect( spin, QtCore.SIGNAL("valueChanged( const int& )" ), self.mapper, QtCore.SLOT("map()") )
				self.mapper.setMapping(spin, a.fullname )
				#Status
				item = QtGui.QTableWidgetItem( str( a.status ) )
				cmbStatus = QtGui.QComboBox()
				self.fillStatus( cmbStatus )
				its = [ 'Waiting to Start', 'Ready to Start', 'In Progress', 'Omit', 'Paused', 'Pending Review', 'Final' ]
				index = cmbStatus.findText( its[ a.status ] )
				if not index == -1:
					cmbStatus.setCurrentIndex(index)
				self.tasks_tw.setItem( i, 4, item )
				self.tasks_tw.setCellWidget(i,4, cmbStatus);
				self.connect( cmbStatus, QtCore.SIGNAL("currentIndexChanged( const int& )" ), self.mapper, QtCore.SLOT("map()") )
				self.mapper.setMapping(cmbStatus, a.fullname)
				#Start DATE
				dsplit =  a.timeStart.split( '-' )
				if '-' in a.timeStart:
					date = QtGui.QDateEdit( QtCore.QDate( int(dsplit[2]),int(dsplit[1]),int(dsplit[0]) ))
				else:
					date = QtGui.QDateEdit()
				date.setCalendarPopup(True)
				item = QtGui.QTableWidgetItem( a.timeStart )
				self.tasks_tw.setItem( i, 5, item )
				self.tasks_tw.setCellWidget(i,5, date);
				self.connect( date, QtCore.SIGNAL("dateChanged( const QDate& )" ), self.mapper, QtCore.SLOT("map()") )
				self.mapper.setMapping(date, a.fullname)
				#End DATE
				dsplit =  a.timeEnd.split( '-' )
				if '-' in a.timeEnd:
					date = QtGui.QDateEdit( QtCore.QDate( int(dsplit[2]),int(dsplit[1]),int(dsplit[0]) ))
				else:
					date = QtGui.QDateEdit()
				date.setCalendarPopup(True)
				item = QtGui.QTableWidgetItem( a.timeEnd )
				self.tasks_tw.setItem( i, 6, item )
				self.tasks_tw.setCellWidget(i,6, date);
				self.connect( date, QtCore.SIGNAL("dateChanged( const QDate& )" ), self.mapper, QtCore.SLOT("map()") )
				self.mapper.setMapping(date, a.fullname)
				i += 1
		self.mapper.connect(QtCore.SIGNAL("mapped(const QString &)"), self.updateTask)
		#self.mapper.mapped.connect(self.updateTask)
		self.tasks_tw.setSortingEnabled(True)
Пример #8
0
	def _fillProyects(self):
		"""docstring for _fillProyects"""
		self.projects_cmb.clear()
		self.projects_cmb.addItems( prj.projects( self.serverPath ) )
		self._fillSequences()
Пример #9
0
	def _fillProjects(self):
		"""add all the projects to the ui"""
		for i,p in enumerate( prj.projects() ):
			self._insertProjectToUI( p, i )
Пример #10
0
	def fillProjects(self):
		"""docstring for fillProjects"""
		self.projects_cmb.clear()
		projects = prj.projects( self.serverPath )
		self.projects_cmb.addItems( projects )
Пример #11
0
 def fillProjects(self):
     """docstring for fillProjects"""
     self.projects_cmb.clear()
     projects = prj.projects(self.serverPath)
     self.projects_cmb.addItems(projects)