예제 #1
0
def customSavePerArea():
	"""docstring for customSavePerArea"""
	curFile = mfl.currentFile();
	result = True
	if '_shading' in curFile.name.lower() or '_model' in curFile.name.lower():
		transForms = gutils.transformsWithoutFreeze()
		texturesNotInServer = tm.Manager().texturesNotInServerPath()
		msg =''
		if transForms:
			msg = '-There are transforms without freeze!, please fix it\n'
		if texturesNotInServer:
			msg += '-There are textures that are not pointing to the server!, please fix it\n'
		if msg:
			result = showMessage( msg )
	if not result == 'Ok':
		curFile.newVersion();
		curFile.save()
		if '_final' in curFile.name.lower():# send mail to lighting department
			gen = sti.Settings().General
			sendMail = gen[ "sendmail" ]
			mailServer = gen[ "mailserver" ]
			mailPort = gen[ "mailport" ]
			mailsPath = gen[ "departmentspath" ]
			asse = prj.shotOrAssetFromFile( curFile )
			if sendMail:
				ml.mailFromTool( 'new_asset_publish',{
						'<ProjectName>' : asse.project.name,
						'<AssetName>': asse.name,
						'<UserName>': os.getenv('username')},
						os.getenv('username') + '@bitt.com',
						mailsPath , mailServer, mailPort  )
예제 #2
0
	def publish(self):
		"""docstring for publish"""
		mails = ''
		mailNoti = 'false'
		if self.gen[ "sendmail" ] == 'True':
			mails = ','.join( ml.getUsersInDepartments( ['compo', 'lighting', 'production'], self.gen[ "departmentspath" ] ) )
			mailNoti = 'true'
		for i in range( self.viewLayers_lw.count() ):
			item = self.viewLayers_lw.item( i )
			if item.checkState() == QtCore.Qt.Checked:
				sqFile, sho, layer, version = item.data(32)[1]
				sqFile.copy( sho.publish3DPath + '/' + layer + '/' + version + '/' )
				if self.gen[ "sendmail" ]:
					ml.mailFromTool( 'new_render',
						{ '<ProjectName>': sho.project.name,
						'<SequenceName>': sho.sequence.name,
						'<ShotName>': sho.name,
						'<RenderLayer>': layer + ' - ' + version,
						'<UserName>': os.getenv('username'),
						'<Path>' : sho.publish3DPath + '/' + layer + '/' + version + '/' },
						os.getenv('username') + '@bitt.com',
						self.gen[ "departmentspath" ] , self.gen[ "mailserver" ], self.gen[ "mailport" ]  )
		msgBox = QtGui.QMessageBox()
		msgBox.setText( "All renderlayers have been published.")
		msgBox.exec_()
예제 #3
0
	def exportAssetCache(self):
		"""docstring for fname"""
		baseDir =  self.fileNameForCache( True )
		#TODO add filename and see best way to detect asset
		exportedAsset = []
		steps = self.steps_spb.value()
		for n in mn.ls( sl = True ):
			baseName = n.name.split( ':' )[0]
			if baseName in exportedAsset:
				continue
			a = ass.getAssetFromNode(n, self._selectedProject)
			cacFile = cfl.CacheFile( baseDir + '/' + baseName + '.abc', [n] )
			cacFile.exportAsset( a, False, False, steps )
			exportedAsset.append( baseName )
			if self.copyToServer_chb.isChecked():
				serverFile = cfl.CacheFile( cacFile.path.replace( prj.BASE_PATH, self.serverPath ) )
				serverFile.newVersion()
				cacFile.copy( serverFile.path )
		selShot = self._selectedShot
		if self.sendMail:
			ml.mailFromTool( 'new_cache',
							{ '<ProjectName>': selShot.project.name,
							'<SequenceName>': selShot.sequence.name,
							'<ShotName>': selShot.name,
							'<AssetName>': ','.join( exportedAsset ),
							'<UserName>': os.getenv('username')},
							os.getenv('username') + '@bitt.com',
							self.mailsPath , self.mailServer, self.mailPort  )
		self._fillCacheList()
예제 #4
0
	def publish(self):
		"""docstring for publish"""
		if INMAYA:
			fil = mfl.currentFile()
			if not fil:
				print 'Please Save File To create Playblast'
				return
			movFil = fl.File( fil.versionPath + fil.name + '_v' + str( fil.version ).zfill( 3 ) + '.mov' )
		elif INHOU:
			fil = hfl.currentFile()
			if not fil:
				print 'Please Save File To create Playblast'
				return
			movFil = fl.File( fil.versionPath + fil.name + '_v' + str( fil.version ).zfill( 3 ) + '.mov' )
		if movFil.exists:
			movFil.copy( fil.dirPath + fil.name + '.mov' )
			settings = sti.Settings()
			gen = settings.General
			if gen:
				self.sendMail = gen[ "sendmail" ]
				self.mailServer = gen[ "mailserver" ]
				self.mailPort = gen[ "mailport" ]
				self.mailsPath = gen[ "departmentspath" ]
				AssOrShot = prj.shotOrAssetFromFile( movFil )
				ml.mailFromTool( 'new_playblast',
					{ '<ProjectName>': AssOrShot.project.name,
					'<SequenceName>': AssOrShot.sequence.name,
					'<ShotName>': AssOrShot.name,
					'<UserName>': os.getenv('username'),
					'<Path>':fil.dirPath + fil.name + '.mov'},
					os.getenv('username') + '@bitt.com',
					self.mailsPath , self.mailServer, self.mailPort  )
예제 #5
0
	def exportAnimationScene(self):
		"""docstring for exportAnimationScene"""
		sc.exportAllFromAnim( str ( self.projects_cmb.currentText() ), str( self.sequences_cmb.currentText() ), str( self.shots_cmb.currentText() ), self.serverPath, self.useExocortex_chb.isChecked() )
		selShot = self._selectedShot
		if self.sendMail:
			ml.mailFromTool( 'new_cache',
							{ '<ProjectName>': selShot.project.name,
							'<SequenceName>': selShot.sequence.name,
							'<ShotName>': selShot.name,
							'<AssetName>': 'ALL',
							'<UserName>': os.getenv('username')},
							os.getenv('username') + '@bitt.com',
							self.mailsPath , self.mailServer, self.mailPort  )
예제 #6
0
	def exportCamera(self):
		"""docstring for exportCamera"""
		mc.file( self._selectedShot.poolCam.path, force = True, options = "v=0;", typ = "mayaAscii", pr = True, es = True )
		sel = mc.ls( sl = True )
		cacheFile = cfl.CacheFile( self._selectedShot.poolCam.path.replace( '.ma', '.abc' ), sel )
		cacheFile.export()
		selShot = self._selectedShot
		cacheFile.copy( selShot.compElementsPath )
		if self.sendMail:
			ml.mailFromTool( 'new_cache',
							{ '<ProjectName>': selShot.project.name,
							'<SequenceName>': selShot.sequence.name,
							'<ShotName>': selShot.name,
							'<AssetName>': 'CAMERA',
							'<UserName>': os.getenv('username')},
							os.getenv('username') + '@bitt.com',
							self.mailsPath , self.mailServer, self.mailPort  )
예제 #7
0
	def exportSelectedGeo(self):
		"""docstring for exp"""
		sel = mc.ls( sl = True )
		fileName = self.fileNameForCache()
		cacheFile = cfl.CacheFile( fileName, sel )
		cacheFile.export()
		if self.copyToServer_chb.isChecked():
			cacheFile.copy( cacheFile.path.replace( prj.BASE_PATH, self.serverPath ) )
		selShot = self._selectedShot
		if self.sendMail:
			ml.mailFromTool( 'new_cache',
							{ '<ProjectName>': selShot.project.name,
							'<SequenceName>': selShot.sequence.name,
							'<ShotName>': selShot.name,
							'<AssetName>': fileName,
							'<UserName>': os.getenv('username')},
							os.getenv('username') + '@bitt.com',
							self.mailsPath , self.mailServer, self.mailPort  )
		self._fillCacheList()
예제 #8
0
 def publish(self):
     """docstring for publish"""
     if INMAYA:
         fil = mfl.currentFile()
         if not fil:
             print 'Please Save File To create Playblast'
             return
         movFil = fl.File(fil.versionPath + fil.name + '_v' +
                          str(fil.version).zfill(3) + '.mov')
     elif INHOU:
         fil = hfl.currentFile()
         if not fil:
             print 'Please Save File To create Playblast'
             return
         movFil = fl.File(fil.versionPath + fil.name + '_v' +
                          str(fil.version).zfill(3) + '.mov')
     if movFil.exists:
         movFil.copy(fil.dirPath + fil.name + '.mov')
         settings = sti.Settings()
         gen = settings.General
         if gen:
             self.sendMail = gen["sendmail"]
             self.mailServer = gen["mailserver"]
             self.mailPort = gen["mailport"]
             self.mailsPath = gen["departmentspath"]
             AssOrShot = prj.shotOrAssetFromFile(movFil)
             ml.mailFromTool(
                 'new_playblast', {
                     '<ProjectName>': AssOrShot.project.name,
                     '<SequenceName>': AssOrShot.sequence.name,
                     '<ShotName>': AssOrShot.name,
                     '<UserName>': os.getenv('username'),
                     '<Path>': fil.dirPath + fil.name + '.mov'
                 },
                 os.getenv('username') + '@bitt.com', self.mailsPath,
                 self.mailServer, self.mailPort)