Beispiel #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  )
Beispiel #2
0
	def checkScene(self):
		"""docstring for checkScene"""
		color = [
				QtGui.QColor( "green" ),
				QtGui.QColor( "red" )]
		palette = QtGui.QPalette()
		if gutils.isAllInOneGroup():
			palette.setColor(QtGui.QPalette.Foreground,QtCore.Qt.green)
			self.allInOneGrp_lbl.setText( 'YES' )
		else:
			palette.setColor(QtGui.QPalette.Foreground,QtCore.Qt.red)
			self.allInOneGrp_lbl.setText( 'NO' )
		self.allInOneGrp_lbl.setPalette(palette)
		meshesWithHistory, meshesWithMaterialPerFace = gutils.isMeshWithHistory()
		lists = [self.withMaterialPerFace_lw,
				self.withHistory_lw,
				self.withDuplicatedNames_lw,
				self.withoutFreeze_lw]
		nodes = [meshesWithMaterialPerFace,
				meshesWithHistory,
				gutils.checkDuplicatedNamesInScene(),
				gutils.transformsWithoutFreeze()
				]
		for l,n in zip( lists, nodes ):
			l.clear()
			if len(n) == 0:
				continue
			self._fillList( l, n )