コード例 #1
0
	def doImportNonCache(self) : 
		# import Non Cache 
		logger.debug('run apply non cache')


		# read asset
		listWidget = 'nonCache_tableWidget'
		nonCacheDataFile = self.setting['nonCacheDataPath']
		data = dict()

		if os.path.exists(nonCacheDataFile) : 
			data = fileUtils.ymlLoader(nonCacheDataFile)

		assetNames = self.getTableData(listWidget, self.nonCacheListCol)

		for each in assetNames : 
			assetName = each 
			if data : 
				exportGrp = data[assetName]['exportGrp']
				filePath = data[assetName]['filePath']

				if not hook.objectExists(exportGrp) : 
					if os.path.exists(filePath) : 
						hook.importFile(filePath)

					else : 
						logger.debug('Path does not exists %s' % filePath)

				else : 
					logger.debug('%s already in the scene' % exportGrp)

			else : 
				logger.error('Error check %s' % nonCacheDataFile)

		self.refreshUI()
コード例 #2
0
	def doImportCamera(self) : 
		cameraPath = self.setting['cameraPath']
		cameraInfoPath = self.setting['cameraInfoPath']
		shotCameraName = self.setting['shotCameraName']
		cameraInfoPath = self.setting['cameraInfoPath']

		if not hook.objectExists(shotCameraName) : 
			if os.path.exists(cameraPath) : 
				hook.importFile(cameraPath)
				hook.fixSequencer()

		if os.path.exists(cameraInfoPath) : 
			range = fileUtils.ymlLoader(cameraInfoPath)

			if range : 
				currentShot = self.shotInfo.getShotName()
				min = range[currentShot]['startFrame']
				max = range[currentShot]['endFrame']
				hook.setShotRange(min, max)

		self.checkDataStatus()